101
101
@ Service
102
102
@ RestController
103
103
@ RequestMapping ("" )
104
- public class DemoController extends APIJSONRouterController <Long > { // APIJSONController<Long> { //
104
+ public class DemoController extends APIJSONRouterController <Long > { // APIJSONController<Long> {
105
105
private static final String TAG = "DemoController" ;
106
106
107
107
// 可以更方便地通过日志排查错误
@@ -110,8 +110,21 @@ public String getRequestURL() {
110
110
return httpServletRequest .getRequestURL ().toString ();
111
111
}
112
112
113
- //通用接口,非事务型操作 和 简单事务型操作 都可通过这些接口自动化实现<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
114
-
113
+ /**增删改查统一的类 RESTful API 入口,牺牲一些路由解析性能来提升一点开发效率
114
+ * @param method
115
+ * @param tag
116
+ * @param params
117
+ * @param request
118
+ * @param session
119
+ * @return
120
+ */
121
+ @ PostMapping ("router/{method}/{tag}" )
122
+ @ Override
123
+ public String router (@ PathVariable String method , @ PathVariable String tag , @ RequestParam Map <String , String > params , @ RequestBody String request , HttpSession session ) {
124
+ return super .router (method , tag , params , request , session );
125
+ }
126
+
127
+ // 通用接口,非事务型操作 和 简单事务型操作 都可通过这些接口自动化实现 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
115
128
116
129
/**增删改查统一入口,这个一个方法可替代以下 7 个方法,牺牲一些路由解析性能来提升一点开发效率
117
130
* @param method
@@ -127,13 +140,6 @@ public String crud(@PathVariable String method, @RequestBody String request, Htt
127
140
return super .crud (method , request , session );
128
141
}
129
142
130
- // 增删改查统一的类 RESTful API 入口,牺牲一些路由解析性能来提升一点开发效率
131
- @ PostMapping ("router/{method}/{tag}" )
132
- @ Override
133
- public String router (@ PathVariable String method , @ PathVariable String tag , @ RequestParam Map <String , String > params , @ RequestBody String request , HttpSession session ) {
134
- return super .router (method , tag , params , request , session );
135
- }
136
-
137
143
/**获取
138
144
* @param request 只用String,避免encode后未decode
139
145
* @param session
@@ -218,8 +224,9 @@ public String delete(@RequestBody String request, HttpSession session) {
218
224
return super .delete (request , session );
219
225
}
220
226
227
+ // 通用接口,非事务型操作 和 简单事务型操作 都可通过这些接口自动化实现 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
221
228
222
- //以上接口对应的简版接口,格式为 {method}/{tag}?format=true&@explain=true.. <<<<<<<<<<<<<<<<<<<<<<<<<
229
+ // 以上接口对应的简版接口,格式为 {method}/{tag}?format=true&@explain=true.. <<<<<<<<<<<<<<<<<<<<<<<<<
223
230
224
231
225
232
/**增删改查统一入口,这个一个方法可替代以下 7 个方法,牺牲一些路由解析性能来提升一点开发效率
@@ -318,7 +325,7 @@ public String deleteByTag(@PathVariable String tag, @RequestParam Map<String, St
318
325
return super .deleteByTag (tag , params , request , session );
319
326
}
320
327
321
- //以上接口对应的简版接口,格式为 {method}/{tag}?format=true&@explain=true.. >>>>>>>>>>>>>>>>>>>>>>>>>
328
+ // 以上接口对应的简版接口,格式为 {method}/{tag}?format=true&@explain=true.. >>>>>>>>>>>>>>>>>>>>>>>>>
322
329
323
330
324
331
0 commit comments