From 09c92b3072a156c859fcc3aa489e26a623b0ec64 Mon Sep 17 00:00:00 2001 From: Mic <misvy@vmware.com> Date: Mon, 14 Jan 2013 23:43:13 +0800 Subject: [PATCH] general cleanup - removed unneeded Spring config files - moved i18n files to a dedicated folder --- .../{ => messages}/messages.properties | 0 .../{ => messages}/messages_de.properties | 0 .../{ => messages}/messages_en.properties | 0 src/main/webapp/WEB-INF/petclinic-servlet.xml | 2 +- .../jdbc/JdbcClinicTests-context.xml | 30 --------------- .../jpa/applicationContext-entityManager.xml | 16 -------- .../applicationContext-hibernateAdapter.xml | 9 ----- .../jpa/applicationContext-jpaCommon.xml | 38 ------------------- 8 files changed, 1 insertion(+), 94 deletions(-) rename src/main/resources/{ => messages}/messages.properties (100%) rename src/main/resources/{ => messages}/messages_de.properties (100%) rename src/main/resources/{ => messages}/messages_en.properties (100%) delete mode 100644 src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml delete mode 100644 src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml delete mode 100644 src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml delete mode 100644 src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml diff --git a/src/main/resources/messages.properties b/src/main/resources/messages/messages.properties similarity index 100% rename from src/main/resources/messages.properties rename to src/main/resources/messages/messages.properties diff --git a/src/main/resources/messages_de.properties b/src/main/resources/messages/messages_de.properties similarity index 100% rename from src/main/resources/messages_de.properties rename to src/main/resources/messages/messages_de.properties diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages/messages_en.properties similarity index 100% rename from src/main/resources/messages_en.properties rename to src/main/resources/messages/messages_en.properties diff --git a/src/main/webapp/WEB-INF/petclinic-servlet.xml b/src/main/webapp/WEB-INF/petclinic-servlet.xml index 7467004..5396ff1 100644 --- a/src/main/webapp/WEB-INF/petclinic-servlet.xml +++ b/src/main/webapp/WEB-INF/petclinic-servlet.xml @@ -42,7 +42,7 @@ - Files are stored inside src/main/resources --> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" - p:basename="messages"/> + p:basename="messages/messages"/> diff --git a/src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml b/src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml deleted file mode 100644 index a98d372..0000000 --- a/src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" - xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc" - xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"> - - <context:property-placeholder location="classpath:spring/jdbc.properties"/> - - <context:annotation-config/> - - <tx:annotation-driven/> - - <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" - p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" - p:username="${jdbc.username}" p:password="${jdbc.password}"/> - - <jdbc:initialize-database data-source="dataSource" ignore-failures="ALL"> - <jdbc:script location="${jdbc.initLocation}"/> - <jdbc:script location="${jdbc.dataLocation}"/> - </jdbc:initialize-database> - - <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" - p:dataSource-ref="dataSource" /> - - <bean class="org.springframework.samples.petclinic.jdbc.JdbcClinic" /> - -</beans> diff --git a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml b/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml deleted file mode 100644 index 5451060..0000000 --- a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> - - <aop:aspectj-autoproxy /> - - <bean class="org.springframework.samples.petclinic.aspects.UsageLogAspect" p:historySize="300" /> - - <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> - - <bean id="clinic" class="org.springframework.samples.petclinic.jpa.JpaClinic" /> - -</beans> diff --git a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml b/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml deleted file mode 100644 index 447d1bc..0000000 --- a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://www.springframework.org/schema/p" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - - <bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" - p:database="${jpa.database}" p:showSql="${jpa.showSql}" /> - -</beans> diff --git a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml b/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml deleted file mode 100644 index 3202f94..0000000 --- a/src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://www.springframework.org/schema/p" - xmlns:context="http://www.springframework.org/schema/context" - xmlns:jdbc="http://www.springframework.org/schema/jdbc" - xmlns:tx="http://www.springframework.org/schema/tx" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd - http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd - http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> - - <context:property-placeholder location="classpath:/jdbc.properties" /> - - <tx:annotation-driven /> - - <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" - p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" - p:username="${jdbc.username}" p:password="${jdbc.password}"/> - - <jdbc:initialize-database data-source="dataSource"> - <jdbc:script location="${jdbc.initLocation}"/> - <jdbc:script location="${jdbc.dataLocation}"/> - </jdbc:initialize-database> - - - <!-- Note: the specific "jpaAdapter" bean sits in adapter context file --> - <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" - p:dataSource-ref="dataSource" p:jpaVendorAdapter-ref="jpaAdapter"> - <property name="loadTimeWeaver"> - <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> - </property> - <property name="persistenceXmlLocation" value="classpath:META-INF/jpa-persistence.xml"/> - </bean> - - <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" - p:entityManagerFactory-ref="entityManagerFactory" /> -</beans> -- GitLab