set up project for springdata with a springdata package for repos

This commit is contained in:
Fredrik Friis 2012-03-23 16:21:05 +09:00
parent a38c107a27
commit ab18a33e63
3 changed files with 24 additions and 3 deletions

12
pom.xml

@ -19,6 +19,11 @@
<url>http://wiquery.googlecode.com/svn/repo/</url>
<layout>default</layout>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>http://repo.springsource.org/libs-milestone</url>
</repository>
</repositories>
<dependencies>
<!-- WICKET DEPENDENCIES -->
@ -115,7 +120,11 @@
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${org.springframework.data.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
@ -412,6 +421,7 @@
<jetty.version>6.1.25</jetty.version>
<hibernate.version>3.5.1-Final</hibernate.version>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
<org.springframework.data.version>1.0.3.RELEASE</org.springframework.data.version>
</properties>
<profiles>

@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"
default-autowire="byType">
<jpa:repositories base-package="se.su.dsv.scipro.springdata" />
<!-- Sets up spring autowire configuration based on annotations -->
<context:annotation-config/>
<context:component-scan base-package="se.su.dsv.scipro"/>

@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"
default-autowire="byName" default-lazy-init="true">
<jpa:repositories base-package="se.su.dsv.scipro.springdata" />
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="testPersistenceUnit"/>