-
Notifications
You must be signed in to change notification settings - Fork 0
18.07.12
chy edited this page Jul 31, 2018
·
2 revisions
CASE
WHEN Quantity > 30 THEN "The quantity is greater than 30"
WHEN Quantity = 30 THEN "The quantity is 30"
ELSE "The quantity is something else"
ENDpreHandle : false return ์ controller๋ก ์์ฒญ์ด ๋์ด๊ฐ์ง ์์
ROUND
-
SELECT ROUND(3456.1234567 ,1)โ 3456.1 -
SELECT ROUND(3456.1234567 ,-1)โ 3460
TRUNCATE
-
SELECT TRUNCATE(3456.1234567 ,1)โ 3456.1 -
SELECT TRUNCATE(3456.1234567 ,-1)โ 3450
Map<String, Integer> hashMap = new HashMap<String, Integer>()
{{
put("One", 1);
put("Two", 2);
put("Three", 3);
}};๋งค๋ฒ ์๋ก์ด ํด๋์ค๋ฅผ ์์ฑํ๋ฏ๋ก ์ฌ์ฉํ์ง ์๋๋ก ํ์
@RequestMapping("/foo")
public String foo(ModelMap model) {
model.put("foo", "foo");
return "forward:/bar";
}
@RequestMapping("/bar")
public String bar(HttpServletRequest request, ModelMap model) {
request.getAttribute("foo"); // "foo"
return "something";
}controller์์ foward ๊ธฐ๋ฅ์ ์ด์ฉ์, Model์ ์ ๋ณด๋ request์ attribute ํ์์ผ๋ก ์ ๋ฌ
'aaaa'.replace('a','2') // '2aaa'
'aaaa'.replace(/a/g,'2') // '2222'regex ํํ์์ ์ด์ฉํ ๋๋ ' ๋๋"์ ๋ถ์ด๋ฉด ์๋จ