File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/cn/com/ttblog/ssmbootstrap_table/controller Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 6969@ RequestMapping ("/test" )
7070@ SessionAttributes ("name" )
7171public class TestController {
72+ private static final Logger LOG =LoggerFactory .getLogger (TestController .class );
7273 private Logger loggerAccess = LoggerFactory .getLogger ("access" );
7374// private Logger logger = LoggerFactory.getLogger(this.getClass());
7475 private Logger logger = loggerAccess ;
@@ -94,6 +95,19 @@ public void setJdbcUrl(String url) {
9495 JDBCURL = url ;
9596 }
9697
98+ //@RequestMapping不写value会默认映射类上的访问路径"/test"
99+ @ RequestMapping (method =RequestMethod .GET )
100+ public @ ResponseBody String getTest () {
101+ LOG .debug ("GET to /test" );
102+ return "GET to /test" ;
103+ }
104+
105+ @ RequestMapping (method =RequestMethod .POST )
106+ public @ ResponseBody String postTest () {
107+ LOG .debug ("POST to /test" );
108+ return "POST to /test" ;
109+ }
110+
97111 @ RequestMapping (value = {"/getJdbcUrl" })
98112 public @ ResponseBody String getJdbcUrl () {
99113 logger .debug ("静态属性值:{}" ,JDBCURL );
You can’t perform that action at this time.
0 commit comments