用maven配置springboot+freemarker

1.创建项目

 用maven配置springboot+freemarker_第1张图片

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

 

2.创建之后完成之后

添加依赖


org.springframework.boot
spring-boot-starter-parent
1.3.5.RELEASE

org.springframework.boot
spring-boot-starter


org.springframework.boot
spring-boot-starter-web



org.springframework.boot
spring-boot-starter-freemarker



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

用maven配置springboot+freemarker_第2张图片

 

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

用maven配置springboot+freemarker_第3张图片

 


 

 

 

 

转载于:https://www.cnblogs.com/liduanwen/p/5695919.html

你可能感兴趣的:(java)