Skip to content
Snippets Groups Projects
Commit 3dc88e06 authored by Keith Donald's avatar Keith Donald Committed by Mic
Browse files

polish

parent 4b68a74b
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<groupId>javax.persistence</groupId> <groupId>javax.persistence</groupId>
<artifactId>com.springsource.javax.persistence</artifactId> <artifactId>com.springsource.javax.persistence</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet</artifactId> <artifactId>com.springsource.javax.servlet</artifactId>
...@@ -146,6 +146,12 @@ ...@@ -146,6 +146,12 @@
<version>${spring.version}</version> <version>${spring.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>com.springsource.javax.transaction</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
<repository> <repository>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation=" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd xmlns:tx="http://www.springframework.org/schema/tx"
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd xsi:schemaLocation="
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> 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"/> <context:property-placeholder location="classpath:jdbc.properties"/>
<context:annotation-config/> <context:annotation-config/>
<tx:annotation-driven/> <tx:annotation-driven/>
<bean id="dataSource" class="org.springframework.samples.petclinic.config.DbcpDataSourceFactory" <!-- DataSource configuration for Apache Commons DBCP. -->
p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
p:username="${jdbc.username}" p:password="${jdbc.password}" p:populate="${jdbc.populate}" p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
p:schemaLocation="${jdbc.schemaLocation}" p:dataLocation="${jdbc.dataLocation}" p:username="${jdbc.username}" p:password="${jdbc.password}"/>
p:dropLocation="${jdbc.dropLocation}"/>
<!-- Database initializer. If any of the script fails, the initialization stops. -->
<!-- As an alternative, for embedded databases see <jdbc:embedded-database/>. -->
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${jdbc.initLocation}"/>
<jdbc:script location="${jdbc.dataLocation}"/>
</jdbc:initialize-database>
</beans> </beans>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation=" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd xmlns:tx="http://www.springframework.org/schema/tx"
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd xsi:schemaLocation="
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> 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" /> <context:property-placeholder location="classpath:/jdbc.properties" />
<tx:annotation-driven /> <tx:annotation-driven />
<bean id="dataSource" class="org.springframework.samples.petclinic.config.DbcpDataSourceFactory" <!-- DataSource configuration for Apache Commons DBCP. -->
p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
p:username="${jdbc.username}" p:password="${jdbc.password}" p:populate="${jdbc.populate}" p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
p:schemaLocation="${jdbc.schemaLocation}" p:dataLocation="${jdbc.dataLocation}" p:username="${jdbc.username}" p:password="${jdbc.password}"/>
p:dropLocation="${jdbc.dropLocation}"/>
<!-- Database initializer. If any of the script fails, the initialization stops. -->
<!-- As an alternative, for embedded databases see <jdbc:embedded-database/>. -->
<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 --> <!-- Note: the specific "jpaAdapter" bean sits in adapter context file -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
...@@ -23,6 +32,7 @@ ...@@ -23,6 +32,7 @@
<property name="loadTimeWeaver"> <property name="loadTimeWeaver">
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" />
</property> </property>
<property name="persistenceXmlLocation" value="classpath:META-INF/jpa-persistence.xml"/>
</bean> </bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment