Renamed mvc package, fix bug in tests.

This commit is contained in:
Jon Brisbin
2012-03-27 09:36:43 -05:00
parent 26a52332ae
commit 7f907c75cc
23 changed files with 35 additions and 43 deletions

View File

@@ -12,8 +12,8 @@ managing associations.
To use the Spring Data Rest exporter, first package your domain classes and repositories into a JAR
file. Include some Spring XML configuration files in the `META-INF/spring-data-rest` directory (the
file name should end with "-export.xml" to be picked up by the scanner) in that JAR file that include
an applicable EntityManager and DataSource and the Repository configuration (using the special JPA
file name should end with "-export.xml" to be picked up by the scanner). In that JAR file include
an applicable EntityManager and DataSource and Repository configuration (using the special JPA
Repository namespace).
You can either deploy this JAR file into your Servlet container in a "shared" configuration, or you
@@ -73,7 +73,8 @@ The configuration used in testing looks like this:
<import resource="shared.xml"/>
<jpa:repositories base-package="org.springframework.data.rest.test.mvc"/>
<!-- Search for Repositories under this package name -->
<jpa:repositories base-package="org.springframework.data.rest.test.webmvc"/>
</beans>

View File

@@ -7,32 +7,23 @@ allprojects {
group = "org.springframework.data.rest"
version = "$sdRestVersion"
releaseBuild = version.endsWith("RELEASE")
snapshotBuild = version.endsWith("SNAPSHOT")
sourceCompatibility = 6
targetCompatibility = 6
configurations.all {
exclude group: "commons-logging"
exclude module: "slf4j-log4j12"
exclude module: "groovy-all", version: "1.8.0-beta-3-SNAPSHOT"
}
}
subprojects {
repositories {
mavenCentral(artifactUrls: [
"http://maven.springframework.org/release",
"http://maven.springframework.org/milestone",
//"http://repository.jboss.org/maven2/",
//"http://download.java.net/maven/2/"
"http://repo.springframework.org/release",
"http://repo.springframework.org/milestone"
])
mavenLocal()
}
}
subprojects {
apply plugin: "java"
apply plugin: "groovy"
@@ -66,7 +57,7 @@ subprojects {
}
task wrapper(type: Wrapper) { gradleVersion = "1.0-milestone-8" }
task wrapper(type: Wrapper) { gradleVersion = "1.0-milestone-9" }
idea {
project.ipr.withXml { provider ->

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#Thu Mar 08 09:45:33 CST 2012
#Tue Mar 27 08:53:14 CDT 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-8-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-milestone-9-bin.zip

View File

@@ -21,4 +21,4 @@ dependencies {
// Repository Exporter support
compile project(":repository")
}
}

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import java.io.ByteArrayOutputStream;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import java.net.URI;
import java.util.ArrayList;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import java.io.BufferedReader;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import java.util.Arrays;
import java.util.HashMap;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import javax.servlet.http.HttpServletRequest;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.mvc;
package org.springframework.data.rest.webmvc;
import java.io.PrintWriter;
import java.util.List;

View File

@@ -1,13 +1,13 @@
package org.springframework.data.rest.mvc.spec
package org.springframework.data.rest.webmvc.spec
import org.codehaus.jackson.map.ObjectMapper
import org.codehaus.jackson.map.ser.CustomSerializerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.data.rest.core.SimpleLink
import org.springframework.data.rest.core.util.FluentBeanSerializer
import org.springframework.data.rest.mvc.RepositoryRestConfiguration
import org.springframework.data.rest.mvc.RepositoryRestController
import org.springframework.data.rest.mvc.RepositoryRestMvcConfiguration
import org.springframework.data.rest.webmvc.RepositoryRestConfiguration
import org.springframework.data.rest.webmvc.RepositoryRestController
import org.springframework.data.rest.webmvc.RepositoryRestMvcConfiguration
import org.springframework.http.HttpStatus
import org.springframework.http.server.ServletServerHttpRequest
import org.springframework.mock.web.MockHttpServletRequest

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import org.springframework.data.repository.CrudRepository;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import java.util.List;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import java.util.Arrays;
import java.util.HashMap;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import org.springframework.data.repository.CrudRepository;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.rest.test.mvc;
package org.springframework.data.rest.test.webmvc;
import org.springframework.data.repository.CrudRepository;

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
<persistence-unit name="jpa.sample">
<class>org.springframework.data.rest.test.mvc.Person</class>
<class>org.springframework.data.rest.test.mvc.Profile</class>
<class>org.springframework.data.rest.test.mvc.Address</class>
<class>org.springframework.data.rest.test.webmvc.Person</class>
<class>org.springframework.data.rest.test.webmvc.Profile</class>
<class>org.springframework.data.rest.test.webmvc.Address</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.connection.url" value="jdbc:hsqldb:mem:spring"/>

View File

@@ -7,9 +7,9 @@
<import resource="shared.xml"/>
<jpa:repositories base-package="org.springframework.data.rest.test.mvc"/>
<jpa:repositories base-package="org.springframework.data.rest.test.webmvc"/>
<bean class="org.springframework.data.rest.test.mvc.PersonLoader">
<bean class="org.springframework.data.rest.test.webmvc.PersonLoader">
<property name="personRepository" ref="personRepository"/>
<property name="profileRepository" ref="profileRepository"/>
<property name="addressRepository" ref="addressRepository"/>