29
29
import javax .servlet .http .HttpSession ;
30
30
31
31
import org .springframework .web .bind .annotation .PathVariable ;
32
+ import org .springframework .web .bind .annotation .PostMapping ;
32
33
import org .springframework .web .bind .annotation .RequestBody ;
33
34
import org .springframework .web .bind .annotation .RequestMapping ;
34
35
import org .springframework .web .bind .annotation .RestController ;
@@ -74,7 +75,7 @@ public class Controller {
74
75
* @return
75
76
* @see {@link RequestMethod#GET}
76
77
*/
77
- @ RequestMapping (value = "get" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
78
+ @ PostMapping (value = "get" )
78
79
public String get (@ RequestBody String request , HttpSession session ) {
79
80
return new Parser (GET ).setSession (session ).parse (request );
80
81
}
@@ -85,7 +86,7 @@ public String get(@RequestBody String request, HttpSession session) {
85
86
* @return
86
87
* @see {@link RequestMethod#HEAD}
87
88
*/
88
- @ RequestMapping ( value = "head" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
89
+ @ PostMapping ( "head" )
89
90
public String head (@ RequestBody String request , HttpSession session ) {
90
91
return new Parser (HEAD ).setSession (session ).parse (request );
91
92
}
@@ -96,7 +97,7 @@ public String head(@RequestBody String request, HttpSession session) {
96
97
* @return
97
98
* @see {@link RequestMethod#GETS}
98
99
*/
99
- @ RequestMapping ( value = "gets" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
100
+ @ PostMapping ( "gets" )
100
101
public String gets (@ RequestBody String request , HttpSession session ) {
101
102
return new Parser (GETS ).setSession (session ).parse (request );
102
103
}
@@ -107,7 +108,7 @@ public String gets(@RequestBody String request, HttpSession session) {
107
108
* @return
108
109
* @see {@link RequestMethod#HEADS}
109
110
*/
110
- @ RequestMapping ( value = "heads" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
111
+ @ PostMapping ( "heads" )
111
112
public String heads (@ RequestBody String request , HttpSession session ) {
112
113
return new Parser (HEADS ).setSession (session ).parse (request );
113
114
}
@@ -118,7 +119,7 @@ public String heads(@RequestBody String request, HttpSession session) {
118
119
* @return
119
120
* @see {@link RequestMethod#POST}
120
121
*/
121
- @ RequestMapping ( value = "post" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
122
+ @ PostMapping ( "post" )
122
123
public String post (@ RequestBody String request , HttpSession session ) {
123
124
return new Parser (POST ).setSession (session ).parse (request );
124
125
}
@@ -129,7 +130,7 @@ public String post(@RequestBody String request, HttpSession session) {
129
130
* @return
130
131
* @see {@link RequestMethod#PUT}
131
132
*/
132
- @ RequestMapping ( value = "put" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
133
+ @ PostMapping ( "put" )
133
134
public String put (@ RequestBody String request , HttpSession session ) {
134
135
return new Parser (PUT ).setSession (session ).parse (request );
135
136
}
@@ -140,7 +141,7 @@ public String put(@RequestBody String request, HttpSession session) {
140
141
* @return
141
142
* @see {@link RequestMethod#DELETE}
142
143
*/
143
- @ RequestMapping ( value = "delete" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
144
+ @ PostMapping ( "delete" )
144
145
public String delete (@ RequestBody String request , HttpSession session ) {
145
146
return new Parser (DELETE ).setSession (session ).parse (request );
146
147
}
@@ -267,7 +268,7 @@ public String open_head(@PathVariable String request, HttpSession session) {
267
268
* @param request
268
269
* @return
269
270
*/
270
- @ RequestMapping ( value = "post/verify" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
271
+ @ PostMapping ( "post/verify" )
271
272
public JSONObject postVerify (@ RequestBody String request ) {
272
273
JSONObject requestObject = null ;
273
274
int type ;
@@ -307,7 +308,7 @@ public JSONObject postVerify(@RequestBody String request) {
307
308
* @param request
308
309
* @return
309
310
*/
310
- @ RequestMapping ( value = "gets/verify" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
311
+ @ PostMapping ( "gets/verify" )
311
312
public JSONObject getVerify (@ RequestBody String request ) {
312
313
JSONObject requestObject = null ;
313
314
int type ;
@@ -326,7 +327,7 @@ public JSONObject getVerify(@RequestBody String request) {
326
327
* @param request
327
328
* @return
328
329
*/
329
- @ RequestMapping ( value = "heads/verify" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
330
+ @ PostMapping ( "heads/verify" )
330
331
public JSONObject headVerify (@ RequestBody String request ) {
331
332
JSONObject requestObject = null ;
332
333
int type ;
@@ -409,7 +410,7 @@ private JSONObject newVerifyRequest(int type, String phone, String verify) {
409
410
}
410
411
* </pre>
411
412
*/
412
- @ RequestMapping ( value = "login" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
413
+ @ PostMapping ( "login" )
413
414
public JSONObject login (@ RequestBody String request , HttpSession session ) {
414
415
JSONObject requestObject = null ;
415
416
boolean isPassword ;
@@ -517,7 +518,7 @@ public JSONObject login(@RequestBody String request, HttpSession session) {
517
518
* @param session
518
519
* @return
519
520
*/
520
- @ RequestMapping ( value = "logout" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
521
+ @ PostMapping ( "logout" )
521
522
public JSONObject logout (HttpSession session ) {
522
523
long userId ;
523
524
try {
@@ -556,7 +557,7 @@ public JSONObject logout(HttpSession session) {
556
557
}
557
558
* </pre>
558
559
*/
559
- @ RequestMapping ( value = REGISTER , method = org . springframework . web . bind . annotation . RequestMethod . POST )
560
+ @ PostMapping ( REGISTER )
560
561
public JSONObject register (@ RequestBody String request ) {
561
562
JSONObject requestObject = null ;
562
563
@@ -672,7 +673,7 @@ public static JSONObject newIllegalArgumentResult(JSONObject requestObject, Stri
672
673
}
673
674
* </pre>
674
675
*/
675
- @ RequestMapping ( value = "put/password" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
676
+ @ PostMapping ( "put/password" )
676
677
public JSONObject putPassword (@ RequestBody String request ){
677
678
JSONObject requestObject = null ;
678
679
String old_password ;
@@ -789,7 +790,7 @@ else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) {
789
790
}
790
791
* </pre>
791
792
*/
792
- @ RequestMapping ( value = "put/balance" , method = org . springframework . web . bind . annotation . RequestMethod . POST )
793
+ @ PostMapping ( "put/balance" )
793
794
public JSONObject putBalance (@ RequestBody String request , HttpSession session ) {
794
795
JSONObject requestObject = null ;
795
796
JSONObject privacyObj ;
0 commit comments