Permalink
Browse files

fixed mvn builds

  • Loading branch information...
1 parent dfa51c1 commit 0f21ae59622225005ba2f223892531c58179e2ac @priyatam committed Oct 14, 2013
Showing with 30 additions and 27 deletions.
  1. +20 −23 README.md
  2. +8 −2 pom.xml
  3. +1 −1 src/test/resources/driver.json
  4. +1 −1 src/test/resources/policy.json
View
@@ -1,51 +1,48 @@
-SpringMVC Rest- Best Practices
-==============================
-[Updates 07/13]: I got busy with Python projects. Plan to implement this by mid August.
-
-Work in Progress ...
-
----
+SpringMVC - Best Practices
+===============================
A full-blown, functional, tested Spring 3.2 reference application with JPA persistence, REST Level-3 resources, asynchronous processing, jobs, security, unit, mock, integration, functional, rest client stubs, and performance tests, and many best practices I gathered over several years working in mvc / spring / grails web apps.
-# GOALS
+## How to run
+ mvn clean package
+ mvn jetty:run
-## Domain Modeling
+## Best Practices
+
+### Domain Modeling
- Immutable Domain Model with Builder Pattern
- Jackson JSON Annotations
- JPA Annotations
- Unit Tests
-
-## REST
-- REST Errors and Exception Resolver
+
+### REST
+- REST Errors and Exception Resolver
- HATEOAS (REST Level 3)
-## Persistence
+### Persistence
- Transaction Management & Connection Pooling
-- JPA / Hibernate
+- JPA / Hibernate
-## AOP
+### AOP
- Http ETag management, HTTP Caching & Resource optimistic locking
-## Async
+### Async
- Asynchronous processing: Request-Acknowledge-Poll Pattern (Fork-Join/Future implemention on REST)
-- Actors (Akka)
- Jobs
-## Caching
+### Caching
- Simplified caching using Spring’s new @Cacheable / Eh-Cache
-## Spring
+### Spring
- Streamlined configuration for web, persistence, rest, spring, and properties
-## Testing
+### Testing
- Unit Testing (JUnit, Mockito)
- Integration Testing (Spring Test, MVC Test)
-# Libraries Used
+## Libraries Used
- Spring 3.2, JPA 2, Hibernate 4.1
- JSP, JQuery, Twitter Bootstrap 2.2
-- Akka
- H2 db (soon, MongoDb?)
-- JUnit, Mockito, Spring Test, Hamcrest, JsonPath, Restito, Spock
+- JUnit, Mockito, Spring Test, Hamcrest, JsonPath,
- Google Guava, Joda DateTime, Logback/Slf4j, Jackson Json
View
@@ -352,6 +352,12 @@
<artifactId>rest-assured</artifactId>
<version>1.7.2</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
@@ -394,7 +400,7 @@
<webAppSourceDirectory>${basedir}/src/main/webapp</webAppSourceDirectory>
<stopPort>8080</stopPort>
<stopKey>c</stopKey>
- </configuration>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -460,4 +466,4 @@
</plugins>
</reporting>
-</project>
+</project>
@@ -1 +1 @@
-{"links":[],"licenseNum":"Lic-123","licenseExpiryDate":[2013,1,30],"firstName":"Sarah","lastName":"Conor","birthDate":[2013,1,30],"gender":"FEMALE","email":"cooldriver@junkmail123.com","phone":"6178769876","occupation":"hacker","firstLicenseAtAge":23,"isMarried":false,"address":{"addrLine1":"100 cambridge st","addrLine2":"apt 1","city":"cambridge","state":"MA","zip":"02139","type":"HOMEOWNER","links":[]},"drivingHistory":[{"links":[],"driverLicense":null,"purchaseOrLeasedDate":null,"annualMileage":2000,"isGarageParked":true,"isPrimaryOperator":true,"accidentTime":null,"garageParked":true,"primaryOperator":true,"accident":false,"thirdPartyOffence":null}]}
+{"links":[],"licenseNum":"Lic-123","licenseExpiryDate":[2013,10,13],"firstName":"Sarah","lastName":"Conor","birthDate":[2013,10,13],"gender":"FEMALE","email":"cooldriver@junkmail123.com","phone":"6178769876","occupation":"hacker","firstLicenseAtAge":23,"isMarried":false,"address":{"addrLine1":"100 cambridge st","addrLine2":"apt 1","city":"cambridge","state":"MA","zip":"02139","type":"HOMEOWNER","links":[]},"drivingHistory":[{"links":[],"driverLicense":null,"purchaseOrLeasedDate":null,"annualMileage":2000,"isGarageParked":true,"isPrimaryOperator":true,"accidentTime":null,"garageParked":true,"primaryOperator":true,"accident":false,"thirdPartyOffence":null}]}
@@ -1 +1 @@
-{"links":[],"policyNum":"S123","company":"PlymouthRock","effectiveDate":[2015,1,1],"expiryDate":[2013,1,30],"state":"MA","quote":1250,"term":3,"agency":"Commerce","drivers":[{"links":[],"licenseNum":"Lic-123","licenseExpiryDate":[2013,1,30],"firstName":"Sarah","lastName":"Conor","birthDate":[2013,1,30],"gender":"FEMALE","email":"cooldriver@junkmail123.com","phone":"6178769876","occupation":"hacker","firstLicenseAtAge":23,"isMarried":false,"address":{"addrLine1":"100 cambridge st","addrLine2":"apt 1","city":"cambridge","state":"MA","zip":"02139","type":"HOMEOWNER","links":[]},"drivingHistory":[{"links":[],"driverLicense":null,"purchaseOrLeasedDate":null,"annualMileage":2000,"isGarageParked":true,"isPrimaryOperator":true,"accidentTime":null,"garageParked":true,"primaryOperator":true,"accident":false,"thirdPartyOffence":null}]}],"vehicles":[{"links":[],"vin":"123456789","make":"bmw","model":"335xi","year":2012,"plateNum":"1234567890","odomoterReading":24000,"ownerType":"LEASED"}]}
+{"links":[],"policyNum":"S123","company":"PlymouthRock","effectiveDate":[2015,1,1],"expiryDate":[2013,10,13],"state":"MA","quote":1250,"term":3,"agency":"Commerce","drivers":[{"links":[],"licenseNum":"Lic-123","licenseExpiryDate":[2013,10,13],"firstName":"Sarah","lastName":"Conor","birthDate":[2013,10,13],"gender":"FEMALE","email":"cooldriver@junkmail123.com","phone":"6178769876","occupation":"hacker","firstLicenseAtAge":23,"isMarried":false,"address":{"addrLine1":"100 cambridge st","addrLine2":"apt 1","city":"cambridge","state":"MA","zip":"02139","type":"HOMEOWNER","links":[]},"drivingHistory":[{"links":[],"driverLicense":null,"purchaseOrLeasedDate":null,"annualMileage":2000,"isGarageParked":true,"isPrimaryOperator":true,"accidentTime":null,"garageParked":true,"primaryOperator":true,"accident":false,"thirdPartyOffence":null}]}],"vehicles":[{"links":[],"vin":"123456789","make":"bmw","model":"335xi","year":2012,"plateNum":"1234567890","odomoterReading":24000,"ownerType":"LEASED"}]}

0 comments on commit 0f21ae5

Please sign in to comment.