File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Spring-Boot-Ehcache-Anno/src/main/java/com/example/ehcache/controller
Spring-Boot-Redis-Anno/src/main/java/com/example/redis/controller Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,17 @@ public StudentController(StudentService studentService) {
2020 this .studentService = studentService ;
2121 }
2222
23+ @ RequestMapping ("/add" )
24+ public String add (Student student ){
25+ try {
26+ studentService .add (student );
27+ return "success" ;
28+ }catch (Exception e ){
29+ e .printStackTrace ();
30+ }
31+ return "false" ;
32+ }
33+
2334 @ RequestMapping ("/update" )
2435 public String update (Student student ){
2536 try {
Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ public StudentController(StudentService studentService) {
2020 this .studentService = studentService ;
2121 }
2222
23+ @ RequestMapping ("/add" )
24+ public String add (Student student ){
25+ try {
26+ studentService .add (student );
27+ return "success" ;
28+ }catch (Exception e ){
29+ e .printStackTrace ();
30+ }
31+ return "false" ;
32+ }
2333 @ RequestMapping ("/update" )
2434 public String update (Student student ){
2535 try {
You can’t perform that action at this time.
0 commit comments