forked from castello/spring_basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestMappingTest.java
More file actions
38 lines (31 loc) · 1.15 KB
/
RequestMappingTest.java
File metadata and controls
38 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.fastcampus.ch2;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class RequestMappingTest {
// @RequestMapping({"/login/hello.do", "/login/hi.do"})
@RequestMapping("/login/hello.do") // http://localhost/ch2/login/hello.do
public void test1(){
System.out.println("urlpattern=/login/hello.do");
}
@RequestMapping("/login/*") // /login/hello, /login/hi
public void test2(){
System.out.println("urlpattern=/login/*");
}
@RequestMapping("/login/**/tmp/*.do") // /login/tmp/hello.do, /login/aaa/tmp/hello.do
public void test3(){
System.out.println("urlpattern=/login/**/tmp/*.do");
}
@RequestMapping("/login/??")
public void test4(){ // /login/hi, /login/my.car
System.out.println("urlpattern=/login/??");
}
@RequestMapping("*.do") // /hello.do, /hi.do, /login/hi.do
public void test5(){
System.out.println("urlpattern=*.do");
}
@RequestMapping("/*.???") // /hello.aaa, /abc.txt
public void test6(){
System.out.println("urlpattern=*.???");
}
}