mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
general cleanup
- removed unneeded Spring config files - moved i18n files to a dedicated folder
This commit is contained in:
parent
5c25ef9cc1
commit
09c92b3072
8 changed files with 1 additions and 94 deletions
|
@ -42,7 +42,7 @@
|
||||||
- Files are stored inside src/main/resources
|
- Files are stored inside src/main/resources
|
||||||
-->
|
-->
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
|
||||||
p:basename="messages"/>
|
p:basename="messages/messages"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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>
|
|
Loading…
Reference in a new issue