Application启动代码
@SpringBootApplication
public class CloudviewTaskApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(CloudviewTaskApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(CloudviewTaskApplication.class, args);
}
}
1. 放置默认首页default.html,
位置在/src/main/resources/static/index.html
2. 增加IndexController控制器,设置index路由
测试结果,如下