Skip to content

Commit

Permalink
create test interface for contacttype
Browse files Browse the repository at this point in the history
  • Loading branch information
FairWindCo committed Oct 8, 2015
1 parent eb49fb6 commit 5e65913
Show file tree
Hide file tree
Showing 79 changed files with 13,879 additions and 9 deletions.
75 changes: 75 additions & 0 deletions .idea/artifacts/DocumentsDB_war_exploded.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/Gradle__com_goldmansachs_gs_collections_5_1_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/Gradle__com_lmax_disruptor_3_2_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/Gradle__io_gatling_jsr166e_1_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
compile 'org.springframework.security:spring-security-web'
compile 'org.springframework.security:spring-security-taglibs'
//SPIRNG JPS+HIBERNATE (связка для работы с БД)
compile 'org.springframework.integration:spring-integration-jpa'
//compile 'org.springframework.integration:spring-integration-jpa'
compile 'org.springframework.data:spring-data-jpa'
compile 'com.mysema.querydsl:querydsl-core'
compile 'com.mysema.querydsl:querydsl-jpa'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
Expand Down Expand Up @@ -37,4 +39,14 @@ public JGridRowsResponse<ContactType> getTable(HttpServletRequest request){
return new JGridRowsResponse<ContactType>(repositoryContactType.findAll());
}

@Transactional(readOnly = false)
@RequestMapping(value = "/add", method = RequestMethod.POST)
@ResponseBody
public String add(@ModelAttribute ContactType contactType, BindingResult result){
if(result.hasErrors()){
return "ERROR:"+result.toString();
}
repositoryContactType.save(contactType);
return "Success";
}
}
Loading

0 comments on commit 5e65913

Please sign in to comment.