码迷,mamicode.com
首页 > 编程语言 > 详细

用maven配置springboot+freemarker

时间:2016-07-22 19:01:18      阅读:284      评论:0      收藏:0      [点我收藏+]

标签:

1.创建项目

 技术分享

直接点下一步   原因: 不勾选 Create from archetype,是项目创建的骨架的时候,由于不知道什么原因就卡住了,一直在刷新

技术分享

 

2.创建之后完成之后

添加依赖

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--- 下面是配置freemarker的依赖 START-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

<!--- 下面是配置freemarker的依赖 END-->
3.将配置文件配置端口
server.port=8089
spring.freemarker.settings.classic_compatible=true
如果将文件需要重新放置文件夹的路径:spring.freemarker.template-loader-path=classpath:/webapp/templates/

技术分享

 

4.项目启动完成,显示.

技术分享

 


 

 

 

 

用maven配置springboot+freemarker

标签:

原文地址:http://www.cnblogs.com/liduanwen/p/5695919.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!