DATAJPA-272 - Polished logging setup to reduce noise in test cases.

This commit is contained in:
Oliver Gierke
2012-11-27 16:17:51 +01:00
parent 4b99eadd1d
commit b7e1e2fcde
7 changed files with 14 additions and 9 deletions

View File

@@ -72,8 +72,6 @@ public class MergingPersistenceUnitManagerUnitTests {
assertThat(info.getMappingFileNames().size(), is(2));
assertThat(info.getMappingFileNames(), hasItems("foo.xml", "bar.xml"));
System.out.println(info.getPersistenceUnitRootUrl());
}
@Test

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd" version="2.0">
<persistence-unit-metadata>
<persistence-unit-defaults>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="default">
<class>org.springframework.data.jpa.domain.AbstractPersistable</class>
<class>org.springframework.data.jpa.domain.sample.User</class>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="first">
<class>org.springframework.data.jpa.domain.sample.User</class>
<class>org.springframework.data.jpa.domain.sample.SpecialUser</class>

View File

@@ -15,6 +15,7 @@
<prop key="javax.persistence.jdbc.password"></prop>
<prop key="javax.persistence.ddl-generation">create-tables</prop>
<prop key="eclipselink.weaving.internal">false</prop>
<prop key="eclipselink.logging.level">SEVERE</prop>
</util:properties>
</beans>

View File

@@ -7,9 +7,9 @@
</encoder>
</appender>
<logger name="org.springframework.data" level="info" />
<logger name="org.springframework.data" level="error" />
<root level="warn">
<root level="error">
<appender-ref ref="console" />
</root>

View File

@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<!-- EclipseLink vendor adaptor with workaround platform class for HSQL usage -->
<bean id="vendorAdaptor" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" parent="abstractVendorAdaptor">
<property name="database" value="HSQL" />
</bean>
<util:properties id="jpaProperties">
<prop key="openjpa.Log">none</prop>
</util:properties>
</beans>