05 2020 档案

摘要:1.格式化常量字符串 public class TimeFormatter { //构造方法私有化:该类本身地方除外的其他地方无法实例化该类对象 private TimeFormatter() { } public static final String DATETIME_FORMATTER = " 阅读全文
posted @ 2020-05-24 09:42 Sherlock先生 阅读(907) 评论(0) 推荐(0) 编辑
摘要:废话少说,直接干货: 前提:添加图片转换器 @Configuration public class WebMvcConfig implements WebMvcConfigurer { /** * 增加图片转换器 * @param converters */ @Override public voi 阅读全文
posted @ 2020-05-19 17:33 Sherlock先生 阅读(13406) 评论(3) 推荐(3) 编辑
摘要:Spring Security默认是禁用注解的,要想开启注解,要在继承WebSecurityConfigurerAdapter的类加@EnableGlobalMethodSecurity注解,并在该类中将AuthenticationManager定义为Bean @Configuration @Ena 阅读全文
posted @ 2020-05-15 10:28 Sherlock先生 阅读(2342) 评论(0) 推荐(0) 编辑
摘要:一.入门(Spring Security在不进行任何配置下默认给出的用户user 密码随项目启动生成随机字符串) 1.添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-start 阅读全文
posted @ 2020-05-08 18:02 Sherlock先生 阅读(355) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示