springboot
Super_Cookies
s'z
展开
-
使用thymeleaf模板根据当前路径动态动态更改样式
前提在使用多个界面时 因为有很多一样的界面 例如 上下框 搜索框 所以会提取一个commons界面 但是不同的界面不同的标题高亮的标签 则需要通过判断当前路径 则通过以下方法th:classappend="${#strings.contains(#httpServletRequest.requestURL,'types')} ? 'active':''"通过判断有没有包括某个字符串来判断是否添加激活状态...原创 2021-01-20 14:52:30 · 619 阅读 · 0 评论 -
RedisTemplate一直为空
看了很多地方 发现都不是我的问题@Componentpublic class CountInterceptor implements HandlerInterceptor { @Resource(name = "stringRedisTemplate") StringRedisTemplate stringRedisTemplate; @Override public boolean preHandle(HttpServletRequest request, Http原创 2021-01-05 09:01:24 · 1488 阅读 · 1 评论 -
java.io.FileNotFoundException: C:\Users\Administrator\AppData\Local\Temp
是springboot在使用transferTo方法的时候的错误改成:导入maven<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version></dependency>FileUtils.copyInputStreamToFile(he原创 2020-12-30 10:29:02 · 8179 阅读 · 0 评论 -
mybatis.config-location=classpath*:/mybatis/*.xml 无法使用
同时导入了mybatis-plus和mybatis 不能使用mybatis.config-location=classpath*:/mybatis/*.xml只能使用mybatis-plus配置文件mybatis-plus: mapper-locations: classpath*:/mybatis/*.xmlhttps://blog.csdn.net/qq920447939/article/details/83988676...原创 2020-12-29 17:15:34 · 967 阅读 · 1 评论 -
SpringBoot使用@MatrixVariable
1:实现WebMvcConfigurer实现configurePathMatch方法@Overridepublic void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = new UrlPathHelper(); //不移除后面的变量 是的矩阵变量功能可以使用 urlPathHelper.setRemoveSemicolonContent(false);原创 2020-12-26 11:32:06 · 269 阅读 · 0 评论