creation des permiere class

This commit is contained in:
trochas
2025-09-17 12:38:07 +02:00
parent 150038422c
commit 8200165fc5
35 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="dev" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="jakarta.persistence.jdbc.driver"
value="org.hsqldb.jdbcDriver" />
<property name="jakarta.persistence.jdbc.url"
value="jdbc:hsqldb:hsql://localhost/" />
<property name="jakarta.persistence.jdbc.user" value="sa" />
<property name="jakarta.persistence.jdbc.password" value="" />
<property
name="jakarta.persistence.schema-generation.database.action"
value="create" />
<property name="jakarta.persistence.dialect"
value="org.hibernate.dialect.HSQLDialect" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
<persistence-unit name="prod" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="jakarta.persistence.jdbc.driver"
value="org.hsqldb.jdbcDriver" />
<property name="jakarta.persistence.jdbc.url"
value="jdbc:hsqldb:hsql://localhost/" />
<property name="jakarta.persistence.jdbc.user" value="sa" />
<property name="jakarta.persistence.jdbc.password" value="" />
<property
name="jakarta.persistence.schema-generation.database.action"
value="update" />
<property name="jakarta.persistence.dialect"
value="org.hibernate.dialect.HSQLDialect" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
<persistence-unit name="mysql">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="jakarta.persistence.jdbc.driver"
value="com.mysql.cj.jdbc.Driver" />
<property name="jakarta.persistence.jdbc.url"
value="jdbc:mysql://localhost/mydatabase" />
<property name="jakarta.persistence.jdbc.user" value="tlc" />
<property name="jakarta.persistence.jdbc.password" value="tlc" />
<property
name="jakarta.persistence.schema-generation.database.action"
value="update" />
<property name="jakarta.persistence.dialect"
value="org.hibernate.dialect.MySQL8Dialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.c3p0.min_size" value="5" />
<property name="hibernate.c3p0.max_size" value="20" />
<property name="hibernate.c3p0.timeout" value="300" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.idle_test_period" value="3000" />
</properties>
</persistence-unit>
</persistence>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,15 @@
----------------------------------------------log4j.properties
### direct log messages to stdout
###
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
# Log everything. Good for troubleshooting
log4j.logger.org.hibernate=ERROR
# Log all JDBC parameters
log4j.logger.org.hibernate.type=ERROR

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.