17
17
import java .net .URLDecoder ;
18
18
import java .util .Map ;
19
19
20
- import javax .servlet .http .HttpSession ;
20
+ import jakarta .servlet .http .HttpSession ;
21
21
22
22
import org .springframework .web .bind .annotation .GetMapping ;
23
23
import org .springframework .web .bind .annotation .PathVariable ;
@@ -61,7 +61,7 @@ public Parser<Long> newParser(HttpSession session, RequestMethod method) {
61
61
*/
62
62
@ PostMapping (value = "{method}" ) // 如果和其它的接口 URL 冲突,可以加前缀,例如改为 crud/{method} 或 Controller 注解 @RequestMapping("crud")
63
63
@ Override
64
- public String crud (@ PathVariable String method , @ RequestBody String request , HttpSession session ) {
64
+ public String crud (@ PathVariable ( "method" ) String method , @ RequestBody String request , HttpSession session ) {
65
65
return super .crud (method , request , session );
66
66
}
67
67
@@ -87,7 +87,7 @@ public String crudAll(@RequestBody String request, HttpSession session) {
87
87
*/
88
88
@ PostMapping ("{method}/{tag}" ) // 如果和其它的接口 URL 冲突,可以加前缀,例如改为 crud/{method}/{tag} 或 Controller 注解 @RequestMapping("crud")
89
89
@ Override
90
- public String crudByTag (@ PathVariable String method , @ PathVariable String tag , @ RequestParam Map <String , String > params , @ RequestBody String request , HttpSession session ) {
90
+ public String crudByTag (@ PathVariable ( "method" ) String method , @ PathVariable ( "tag" ) String tag , @ RequestParam Map <String , String > params , @ RequestBody String request , HttpSession session ) {
91
91
return super .crudByTag (method , tag , params , request , session );
92
92
}
93
93
@@ -99,7 +99,7 @@ public String crudByTag(@PathVariable String method, @PathVariable String tag, @
99
99
* @see {@link RequestMethod#GET}
100
100
*/
101
101
@ GetMapping ("get/{request}" )
102
- public String openGet (@ PathVariable String request , HttpSession session ) {
102
+ public String openGet (@ PathVariable ( "request" ) String request , HttpSession session ) {
103
103
try {
104
104
request = URLDecoder .decode (request , StringUtil .UTF_8 );
105
105
} catch (Exception e ) {
0 commit comments