File tree Expand file tree Collapse file tree 6 files changed +113
-0
lines changed
java/info/xiaomo/freemarker/controller
velocity/src/main/java/info/xiaomo/velocity/controller
website/src/main/java/info/xiaomo/website/service Expand file tree Collapse file tree 6 files changed +113
-0
lines changed Original file line number Diff line number Diff line change 1+ package info .xiaomo .freemarker .controller ;
2+
3+ import org .springframework .stereotype .Controller ;
4+ import org .springframework .ui .ModelMap ;
5+ import org .springframework .web .bind .annotation .RequestMapping ;
6+
7+ /**
8+ * 把今天最好的表现当作明天最新的起点..~
9+ * いま 最高の表現 として 明日最新の始発..~
10+ * Today the best performance as tomorrow newest starter!
11+ * Created by IntelliJ IDEA.
12+ *
13+ * @author: xiaomo
14+ * @github: https://github.com/qq83387856
15+ * @email: hupengbest@163.com
16+ * @QQ_NO: 83387856
17+ * @Date: 2016/11/16 10:19
18+ * @Copyright(©) 2015 by xiaomo.
19+ **/
20+
21+ @ Controller
22+ public class FreemarkerController {
23+
24+ @ RequestMapping ("hello" )
25+ public String hello (ModelMap map ) {
26+ map .put ("host" , "使用freemarker!" );
27+ return "index" ;
28+ }
29+
30+ }
Original file line number Diff line number Diff line change 1+ logging.config =classpath:config/logback-dev.xml
2+ server.port =8080
3+ server.session.timeout =1800
4+ server.max-http-header-size =20971520
5+
6+ spring.jackson.date-format =yyyy-MM-dd HH:mm:ss
7+ spring.jackson.time-zone =GMT+8
8+
9+ spring.freemarker.charset =utf-8
10+
11+ # other
12+ banner.location =config/banner-girl.txt
13+
Original file line number Diff line number Diff line change 1+ .::::.
2+ .::::::::.
3+ :::::::::::
4+ ..:::::::::::'
5+ '::::::::::::'
6+ .::::::::::
7+ '::::::::::::::..
8+ ..::::::::::::.
9+ ``::::::::::::::::
10+ ::::``:::::::::' .:::.
11+ ::::' ':::::' .::::::::.
12+ .::::' :::: .:::::::'::::.
13+ .:::' ::::: .:::::::::' ':::::.
14+ .::' :::::.:::::::::' ':::::.
15+ .::' ::::::::::::::' ``::::.
16+ ...::: ::::::::::::' ``::.
17+ ```` ':. ':::::::::' ::::..
18+ '.:::::' ':'````..
19+ :: Spring Boot :: (v1.4.1.RELEASE)
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <configuration scan =" true" >
4+
5+ <appender name =" stdout" class =" ch.qos.logback.core.ConsoleAppender" >
6+ <encoder charset =" UTF-8" >
7+ <pattern >%d{HH:mm:ss.SSS} [%thread] %-5level - %msg%n</pattern >
8+ </encoder >
9+ </appender >
10+
11+ <root level =" INFO" >
12+ <appender-ref ref =" stdout" />
13+ </root >
14+
15+ <logger name =" info.xiaomo" level =" DEBUG" />
16+
17+ </configuration >
Original file line number Diff line number Diff line change 1+ package info .xiaomo .velocity .controller ;
2+
3+ import org .springframework .stereotype .Controller ;
4+ import org .springframework .ui .ModelMap ;
5+ import org .springframework .web .bind .annotation .RequestMapping ;
6+
7+ /**
8+ * 把今天最好的表现当作明天最新的起点..~
9+ * いま 最高の表現 として 明日最新の始発..~
10+ * Today the best performance as tomorrow newest starter!
11+ * Created by IntelliJ IDEA.
12+ *
13+ * @author: xiaomo
14+ * @github: https://github.com/qq83387856
15+ * @email: hupengbest@163.com
16+ * @QQ_NO: 83387856
17+ * @Date: 2016/11/16 10:19
18+ * @Copyright(©) 2015 by xiaomo.
19+ **/
20+
21+ @ Controller
22+ public class VelocityController {
23+
24+ @ RequestMapping ("hello" )
25+ public String hello (ModelMap map ) {
26+ map .put ("host" , "使用Velocity!" );
27+ return "index" ;
28+ }
29+
30+ }
Original file line number Diff line number Diff line change 44import info .xiaomo .core .exception .UserNotFoundException ;
55import info .xiaomo .website .model .UserModel ;
66import org .springframework .data .domain .Page ;
7+ import org .springframework .transaction .annotation .Isolation ;
8+ import org .springframework .transaction .annotation .Propagation ;
9+ import org .springframework .transaction .annotation .Transactional ;
710
811import java .util .List ;
912
@@ -25,6 +28,7 @@ public interface UserService {
2528
2629 UserModel findUserById (Long id );
2730
31+ @ Transactional (isolation = Isolation .DEFAULT , propagation = Propagation .REQUIRED )
2832 UserModel findUserByEmail (String email );
2933
3034 UserModel addUser (UserModel model );
You can’t perform that action at this time.
0 commit comments