/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/
package apijson.demo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.net.URLDecoder;
import java.util.Map;
import javax.servlet.http.HttpSession;
import apijson.RequestMethod;
import apijson.StringUtil;
import apijson.framework.javax.APIJSONController;
import apijson.orm.Parser;
/**请求路由入口控制器,包括通用增删改查接口等,转交给 APIJSON 的 Parser 来处理
* 具体见 SpringBoot 文档
* https://www.springcloud.cc/spring-boot.html#boot-features-spring-mvc
* 以及 APIJSON 通用文档 3.设计规范 3.1 操作方法
* https://github.com/Tencent/APIJSON/blob/master/Document.md#3.1
*
建议全通过HTTP POST来请求:
*
1.减少代码 - 客户端无需写HTTP GET,PUT等各种方式的请求代码
*
2.提高性能 - 无需URL encode和decode
*
3.调试方便 - 建议使用 APIAuto(http://apijson.cn/api) 或 Postman
* @author Lemon
*/
@RestController
@RequestMapping("")
public class DemoController extends APIJSONController