Skip to content

Instantly share code, notes, and snippets.

<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all" version="2.0">
</beans>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0" bean-discovery-mode="all">
</beans>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
version="4.0" bean-discovery-mode="annotated">
</beans>
@JorisNienkemper
JorisNienkemper / web.xml
Created November 27, 2020 22:16
jee7 angular friendly web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/</location>
</error-page>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example.joris</groupId>
<artifactId>play03withjaxrs</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>cdi-1.2</feature>
<feature>jaxrs-2.0</feature>
<feature>jpa-2.1</feature>
<feature>json-1.0</feature>
<feature>jndi-1.0</feature>
@JorisNienkemper
JorisNienkemper / gist:800a9a60222fa24b23fdffa13a4c6ccd
Last active June 8, 2020 07:18
install start and connect with java to docker-mysql
#create docker container mysql8
docker run --name mysql8 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pAssw0rd -e MYSQL_DATABASE=cursistdb
-e MYSQL_USER=cursist -e MYSQL_PASSWORD=pAssw0rd -d mysql:latest
docker logs -f mysql8
#Look in the logs for creation of database cursistdb with user cursist and password pAssw0rd
#From the log
#Creating database cursistdb
#Creating user cursist
@JorisNienkemper
JorisNienkemper / persistence-jpa22-mysql8.xml
Last active August 13, 2022 22:24
persistence.xml jpa version 2.2 hibernate mysql8
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
version="2.2">
<persistence-unit name="kcPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<description>
Persistence unit for the JPA tutorial of the Hibernate Getting Started Guide
</description>
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="pu-name" transaction-type="RESOURCE_LOCAL">
<!-- details of persistence unit -->
</persistence-unit>
</persistence>
@JorisNienkemper
JorisNienkemper / standalone-full.xml
Created March 14, 2017 09:46
wildfly10 mysql standalone-full.xml
<?xml version="1.0" ?>
<server xmlns="urn:jboss:domain:4.2">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>