MCPcopy Create free account
hub / github.com/castello/spring_basic / RequestMappingTest

Class RequestMappingTest

ch2/RequestMappingTest.java:6–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import org.springframework.web.bind.annotation.RequestMapping;
5
6@Controller
7public class RequestMappingTest {
8// @RequestMapping({"/login/hello.do", "/login/hi.do"})
9 @RequestMapping("/login/hello.do") // http://localhost/ch2/login/hello.do
10 public void test1(){
11 System.out.println("urlpattern=/login/hello.do");
12 }
13
14 @RequestMapping("/login/*") // /login/hello, /login/hi
15 public void test2(){
16 System.out.println("urlpattern=/login/*");
17 }
18
19 @RequestMapping("/login/**/tmp/*.do") // /login/tmp/hello.do, /login/aaa/tmp/hello.do
20 public void test3(){
21 System.out.println("urlpattern=/login/**/tmp/*.do");
22 }
23
24 @RequestMapping("/login/??")
25 public void test4(){ // /login/hi, /login/my.car
26 System.out.println("urlpattern=/login/??");
27 }
28
29 @RequestMapping("*.do") // /hello.do, /hi.do, /login/hi.do
30 public void test5(){
31 System.out.println("urlpattern=*.do");
32 }
33
34 @RequestMapping("/*.???") // /hello.aaa, /abc.txt
35 public void test6(){
36 System.out.println("urlpattern=*.???");
37 }
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected