SpringBoot
Marlboro8023
Python java
展开
-
ArgumentResolver 使用
ArgumentResolver 是spring的参数解决器组件public class UserArgumentResolver implements HandlerMethodArgumentResolver {@AutoWiredYourService yourServicepublic boolean supportsParameterType(MethodParameter...原创 2020-04-04 23:41:02 · 341 阅读 · 1 评论 -
SpringBoot知识点(一)
1.屏蔽命令行访问属性的设置:SpringApplication.setAddCommandLineProperties(false)2.多环境配置:在Spring Boot中多环境配置文件名需要满足application-{profile}.properties的格式,其中{profile}对应你的环境标识,比如:application-dev.properties:开发环境applica...原创 2018-11-27 18:45:13 · 380 阅读 · 0 评论 -
解决Spring Boot 使用RedisTemplate 存储键值出现乱码 \xac\xed\x00\x05t\x00
最近使用spring-data-redis RedisTemplate 操作redis时,发现存储在redis中的key不是设置的string值,前面还多出了许多类似\xac\xed\x00\x05t\x00这种字符串,如下:spring-data-redis的RedisTemplate<K, V>模板类在操作redis时默认使用JdkSerializationRedisSeria...原创 2019-01-15 18:28:49 · 790 阅读 · 0 评论