用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