idea中springboot静态资源及页面跳转问题

1,静态资源放在resources/static下,html页面放在resources/templates下

2,在html中引入静态资源时,不用带static(对于路径来说是透明的)

 

3,

配置html的时候需要使用到其他工具,比如freemarker

spring.freemarker.suffix=.html

spring.freemarker.template-loader-path=classpath:/templates/

pom.xml代码:

 

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
        </dependency>

 

 

配置jsp页面的时候使用

spring.mvc.view.prefix=/WEB-INF/

spring.mvc.view.suffix=.jsp

 

posted @   千里之外kb  阅读(2140)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示