SpringBoot增加jsp页面支持,Error resolving template template might not exist or might not be accessible

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bestxianfeng163/article/details/84063337

1.增加mvc支持,一定要注意这种台阶式的配置文件格式,,,(里面还有空格的坑),一定要严格对照

2.启动类增加一个重写的方法

@SpringBootApplication
@MapperScan("com.java.dao")
public class StartApplication  extends SpringBootServletInitializer{
	public static void main(String[] args) {
        SpringApplication.run(StartApplication.class,args);
    }
	 @Override
	    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
	        return application.sources(StartApplication.class);
	    }
	
}

3.不要引入thymeleaf模板引擎,,我就是在这入了一个坑

3.

4.页面在webapp下即可

猜你喜欢

转载自blog.csdn.net/bestxianfeng163/article/details/84063337
今日推荐