![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
ouyang_ouba
这个作者很懒,什么都没留下…
展开
-
thymeleaf + Spring Boot 在开发环境正常,但用jar运行时报错 Error resolving template template might not exist or migh
这个问题我们都很好明白,就是模板页不存在,但是实际上它能找到模板页,但是在使用th:include,th:replace等标签的时候才会出错,这就是问题的症结所在。 其实这个问题也很好解决,我们只需要在引用模板文件的时候不用”/”打头就可以了,通过类似相对路径的方式来引用,但是需要说明的是,这里的相对路径仍然是相对于模板根目录来做的。 @RequestMapping("/view") public...原创 2019-05-02 15:34:35 · 2204 阅读 · 0 评论 -
springboot+editor实现图片上传
其中 private static final String UPLOADED_FOLDER = "/usr/img/blog/"; Controller层方法 @RequestMapping(value="/uploadfile",method=RequestMethod.POST) public void hello(HttpServletRequest request,HttpSe...原创 2019-04-29 15:04:52 · 504 阅读 · 2 评论 -
springboot2.0MVC配置过时替换
springboot1.X MVC配置过时,这个不适合2.x使用 @Configuration public class mvc_t extends WebMvcConfigurerAdapter { } 最好使用 @Configuration public class MyMvcConfig implements WebMvcConfigurer { @Override pu...原创 2019-06-16 15:19:52 · 355 阅读 · 0 评论 -
springboot国际化
国际化基本配置 1、 spring.messages.basename=i18n/login 2、 3、国际化配置文件(根据链接上的区域信息) public class myLoginLocaleResolver implements LocaleResolver { @Override public Locale resolveLocale(HttpServletReques...原创 2019-06-16 17:11:00 · 193 阅读 · 0 评论