用maven配置springboot+freemarker


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.项目启动完成,显示.

 

 

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM