| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
| 3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 |
xmlns:tx="http://www.springframework.org/schema/tx" |
| 5 |
xsi:schemaLocation="http://www.springframework.org/schema/beans |
| 6 |
http://www.springframework.org/schema/beans/spring-beans.xsd |
| 7 |
http://www.springframework.org/schema/tx |
| 8 |
http://www.springframework.org/schema/tx/spring-tx.xsd" |
| 9 |
default-autowire="byName"> |
| 10 |
|
| 11 |
<bean id="entityManagerFactory" |
| 12 |
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
| 13 |
<property name="jpaVendorAdapter"> |
| 14 |
<bean |
| 15 |
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> |
| 16 |
<property name="showSql" value="false"/> |
| 17 |
<property name="generateDdl" value="true"/> |
| 18 |
<property name="databasePlatform" value="org.hibernate.dialect.HSQLDialect"/> |
| 19 |
</bean> |
| 20 |
</property> |
| 21 |
</bean> |
| 22 |
|
| 23 |
<bean id="dataSource" |
| 24 |
class="org.apache.commons.dbcp.BasicDataSource" |
| 25 |
destroy-method="close"> |
| 26 |
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/> |
| 27 |
<property name="url" value="jdbc:hsqldb:test/db/myDB"/> |
| 28 |
<property name="username" value="sa"/> |
| 29 |
<property name="password" value=""/> |
| 30 |
</bean> |
| 31 |
|
| 32 |
<bean id="transactionManager" |
| 33 |
class="org.springframework.orm.jpa.JpaTransactionManager"/> |
| 34 |
|
| 35 |
<tx:annotation-driven/> |
| 36 |
|
| 37 |
<bean |
| 38 |
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> |
| 39 |
|
| 40 |
<bean id="customer" class="com.restfully.shop.services.CustomerResourceBean"/> |
| 41 |
<bean id="product" class="com.restfully.shop.services.ProductResourceBean"/> |
| 42 |
<bean id="order" class="com.restfully.shop.services.OrderResourceBean"/> |
| 43 |
<bean id="store" class="com.restfully.shop.services.StoreResourceBean"/> |
| 44 |
|
| 45 |
|
| 46 |
</beans> |