Skip to content

Commit

Permalink
Formatting, removed validation for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhermann committed Nov 26, 2011
1 parent 7c3af2d commit f6abfea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ dependencies {
compile 'org.springframework:spring-jdbc:3.0.6.RELEASE' compile 'org.springframework:spring-jdbc:3.0.6.RELEASE'
compile 'cglib:cglib:2.2.2' compile 'cglib:cglib:2.2.2'


compile 'javax.validation:validation-api:1.0.0.GA' // json support
compile 'org.hibernate:hibernate-validator:4.2.0.Final'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.8.3' compile 'org.codehaus.jackson:jackson-mapper-asl:1.8.3'


// slf4j so we can have some awesome logging // slf4j so we can have some awesome logging
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/org/jamescarr/examples/Employee.java
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.jamescarr.examples; package org.jamescarr.examples;


import org.hibernate.validator.constraints.NotBlank;

public class Employee { public class Employee {
@NotBlank private String firstName; private String firstName;
@NotBlank private String lastName; private String lastName;


public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class EmployeeController {
public String index() { public String index() {
return "/employee/index"; return "/employee/index";
} }

@RequestMapping(value = "/create", method = RequestMethod.POST) @RequestMapping(value = "/create", method = RequestMethod.POST)
public String create(Employee employee) { public String create(Employee employee) {
employees.save(employee); employees.save(employee);
Expand Down

0 comments on commit f6abfea

Please sign in to comment.