SpringBoot整合小结
一.当页面调不出来
- 注意在配置文件中声明页面文件夹位置 ;例如:
#模板加载后缀
spring.freemarker.suffix=.html
spring.freemarker.template-loader-path=classpath:/Views/
- 同时在controller中如下类似即可;
@Controller
public class ViewController {
@GetMapping("index")
public String index(HttpServletRequest request){
request.setAttribute("ctx",request.getContextPath());
System.out.println("SYH===========");
return "/index";
}
}
SpringBoot整合技巧与常见问题
本文总结了SpringBoot整合过程中的关键步骤与常见问题,包括页面显示配置、必要jar包添加、正确使用@Mapper注解及mapper.xml文件的位置规范。
1万+

被折叠的 条评论
为什么被折叠?



