[JAVA-11892] Logging clean up

This commit is contained in:
Haroon Khan
2022-05-21 20:22:05 +01:00
parent ec41c7e475
commit 565d458747
14 changed files with 104 additions and 13 deletions

View File

@@ -22,8 +22,9 @@ public class ArticleUnitTest {
@BeforeClass
public static void setup() {
Map<String, String> properties = new HashMap<>();
properties.put("hibernate.show_sql", "true");
properties.put("hibernate.format_sql", "true");
// set these to true to see Hibernate SQL
properties.put("hibernate.show_sql", "false");
properties.put("hibernate.format_sql", "false");
emFactory = Persistence.createEntityManagerFactory("jpa-h2", properties);
em = emFactory.createEntityManager();
}

View File

@@ -14,7 +14,7 @@
<property name="javax.persistence.jdbc.user" value="baeldung" />
<property name="javax.persistence.jdbc.password" value="YourPassword" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
@@ -28,7 +28,7 @@
<property name="javax.persistence.jdbc.password" value="" />
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="show_sql" value="true"/>
<property name="show_sql" value="false"/>
<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>
</properties>
</persistence-unit>