4 | Hello VM.
5 |
6 | ## 你看不到我
7 |
8 | #*
9 | 这里都看不到
10 | *#
11 |
12 | value1:$!{value1}
13 | $!{value2}
14 | ${value3}
15 |
16 | #foreach ($color in $colors)
17 | Color $!{foreach.index}/$!{foreach.count}: $!{color}
18 | #end
19 |
20 | #foreach($key in $map.keySet())
21 | Number $!{foreach.index}/$!{foreach.count}: $!{key} $map.get($key)
22 | #end
23 |
24 | #foreach($kv in $map.entrySet())
25 | Number $!{foreach.index}/$!{foreach.count}: $!{kv.key} $!{kv.value}
26 | #end
27 |
28 |
29 | User:$!{user.name}
30 | User:$!{user.getName()}
31 |
32 | #set($title = "nowcoder")
33 | Include: #include("header.vm")
34 | Parse:#parse("header.vm")
35 |
36 | #macro (render_color, $color, $index)
37 | Color By Macro $index, $color
38 | #end
39 |
40 | #foreach ($color in $colors)
41 | #render_color($color, $foreach.index)
42 | #end
43 |
44 | #set($hello = "hello")
45 | #set($hworld1 = "$!{hello} world")
46 | #set($hworld2 = '$!{hello} world')
47 |
48 | hworld1:$hworld1
49 | hworld2:$hworld2
50 |
51 | $!{colors.size()}
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/main/resources/mybatis-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |