Skip to content

Commit

Permalink
cleanup and persistence work
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenp committed Feb 29, 2016
1 parent 1dc78c6 commit b2b3db5
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 40 deletions.
22 changes: 4 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Resources
- [REST With Spring] (http://bit.ly/restwithspring)
- Continuous Integration: [CI on Cloudbees](https://rest-security.ci.cloudbees.com)
- Continuous Integration: [CI on Cloudbees](https://rest-security.ci.cloudbees.com/view/REST-With-Spring/)


# Quick Start
Expand All @@ -10,27 +10,13 @@ cd REST-With-Spring
mvn clean install
mvn cargo:run -f um-webapp/pom.xml
```
- **next**: start consuming the service like so: [REST API: Consuming Examples with `curl`](https://github.com/eugenp/REST/wiki/REST-API%3A-Consuming-Examples-with-%60curl%60)


# Goals
**REST With Spring** is a proof of concept implementation of a RESTful Service. <br/>
The project also provides a reference implementation for:
- REST Discoverability and HATEOAS <br/>
- Basic and Digest Authentication <br/>
- ETag support
- support for Multiple Representations (on the same URIs) (JSON, XML) <br/>
- a full REST based Query Language for advanced filtering of resources <br/>
- Sorting and Pagination in REST <br/>
- Statelessness for REST with Spring <br/>
- full integration testing suites at every layer: unit tests, integration tests for the DAO and Service layers, integration tests against the REST service <br/>


# Technology Stack
The project uses the following technologies: <br/>
- **web/REST**: [Spring](http://www.springsource.org/) 4.2.x <br/>
- **marshalling**: [Jackson](https://github.com/FasterXML/jackson-databind) 2.x (for JSON) and [XStream](http://xstream.codehaus.org/) (for XML) <br/>
- **persistence**: [Spring Data JPA](http://www.springsource.org/spring-data/jpa) and [Hibernate](http://www.hibernate.org/) 4.1.x <br/>
- **marshalling**: [Jackson](https://github.com/FasterXML/jackson-databind) 2.x (for JSON) and the new [Jackson XML extension](https://github.com/FasterXML/jackson-dataformat-xml) (for XML) <br/>
- **persistence**: [Spring Data JPA](http://www.springsource.org/spring-data/jpa) and [Hibernate](http://www.hibernate.org/) <br/>
- **persistence providers**: H2, MySQL
- **testing**: [junit](http://www.junit.org/), [hamcrest](http://code.google.com/p/hamcrest/), [mockito](http://code.google.com/p/mockito/), [rest-assured](http://code.google.com/p/rest-assured/) <br/>

Expand All @@ -42,4 +28,4 @@ The project uses the following technologies: <br/>


# Eclipse
- see the [Eclipse wiki page](https://github.com/eugenp/REST/wiki/Eclipse:-Setup-and-Configuration) of this project
- see the [Eclipse wiki page](https://github.com/eugenp/REST-With-Spring/wiki/Eclipse:-Setup-and-Configuration) of this project
4 changes: 2 additions & 2 deletions common-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<!-- util -->
Expand Down
4 changes: 2 additions & 2 deletions common-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<!-- web -->
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>user-management-parent</name>
Expand Down Expand Up @@ -146,7 +146,7 @@
<!-- persistence -->
<hibernate-jpamodelgen.version>5.0.5.Final</hibernate-jpamodelgen.version>
<querydsl.version>4.0.7</querydsl.version>
<spring-data-jpa.version>1.9.1.RELEASE</spring-data-jpa.version>
<spring-data-jpa.version>1.9.2.RELEASE</spring-data-jpa.version>

<h2.version>1.4.190</h2.version>
<hsqldb.version>2.3.3</hsqldb.version>
Expand Down
6 changes: 3 additions & 3 deletions um-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand All @@ -17,13 +17,13 @@
<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions um-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.baeldung</groupId>
<artifactId>um-ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>um-ui</name>
Expand All @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.0.RELEASE</version>
<version>1.3.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down
6 changes: 3 additions & 3 deletions um-webapp/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="common-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common/common">
<dependent-module archiveName="common-1.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common/common">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="common-client-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common-client/common-client">
<dependent-module archiveName="common-client-1.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common-client/common-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="um-client-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/um-client/um-client">
<dependent-module archiveName="um-client-1.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/um-client/um-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/rest/target/classes"/>
Expand Down
12 changes: 6 additions & 6 deletions um-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.baeldung</groupId>
<artifactId>user-management-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand All @@ -19,34 +19,34 @@
<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>

<dependency>
<groupId>org.baeldung</groupId>
<artifactId>common-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.baeldung</groupId>
<artifactId>um-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.baeldung</groupId>
<artifactId>um-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Configuration
@EnableTransactionManagement
@ComponentScan({ "org.baeldung.um.persistence" })
@PropertySource({ "classpath:persistence-${persistenceTarget:mysql}.properties" })
@PropertySource({ "classpath:persistence-${persistenceTarget:h2}.properties" })
@EnableJpaRepositories(basePackages = "org.baeldung.um.persistence.dao")
public class UmPersistenceJpaConfig {

Expand Down

0 comments on commit b2b3db5

Please sign in to comment.