- 博客(9)
- 收藏
- 关注
原创 SpringBoot-Data-JPA2.0命名策略详解
最近有个项目因为命名策略的原因导致数据库表的不符合标准,所以看了下源码,废话不多说上代码!现有的命名策略jpa现有的命名策略设置:hibernate.implicit_naming_strategy(隐式),hibernate.physical_naming_strategy(物理显示)implicit_naming_strategy 有5个策略:实现ImplicitNamingStrategy接口,其中SpringImplicitNamingStrategy策略是实现了ImplicitNami.
2021-02-02 21:30:34 1854 2
原创 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(4)
继上一篇 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(3) 继续补充使用自己的redis缓存机制重写redisCache—CustimCache类@Slf4jpublic class CustomCache<K,V> implements Cache<K,V> { /** * 缓存的key名称获取为shi...
2020-04-15 14:53:10 871 11
原创 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(3)
继上一篇 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(2)继续补充Shiro权限设置shiro的权限设置在AuthRealm中doGetAuthorizationInfo设置,具体的设置权限和角色根据自己的业务逻辑设置,我这边只用了权限 @Override protected AuthorizationInfo doGetAuthoriz...
2020-04-14 14:31:10 1147 1
原创 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(2)
继上一篇 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(1) 继续补充不足点1. 权限在RedisDesktopManager不可查看解决方法:在ShiroConfig.java类中 public RedisCacheManager cacheManager() { RedisCacheManager redisCacheManag...
2020-04-01 20:16:23 2364 3
原创 Springboot2 + Shiro + Redis + Jwt 前后端分离整合(1)
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId>
2020-04-01 18:57:18 3080 8
原创 Spring注解 @Scope详解
项目中用到@Scope该注解,然后出线一些情况,所以总结下下面是@Scope注解的源码@Target({ElementType.TYPE, ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface Scope { /** * Alias for {@link #sco...
2019-11-27 20:33:20 864
原创 基于Spring加载类、构造方法、静态块、加载先后顺序
以前面试有做到一个题,类、构造方法、静态块的执行顺序,这几天突然想到如果在SpringBoot下的执行顺序呢?为什么不用Spring,在这个小demo中SpringBoot无需额外的配置直接可以写我想要的代码,所以这个结果对于Spring来说是一样的。Spring Boot基本上是Spring框架的扩展,它消除了设置Spring应用程序所需的XML配置,为更快,更高效的开发生态系统铺平了道路。废...
2019-11-27 17:24:57 2224
原创 Spring3.0使用@Value碰到的一个状况
基于上一篇文章 Spring3.0 对于@Configuration的使用 的后续 在使用Spring3.0使用@Value注入properties文件的变量时,出现值无法注入原Spring3.0可在applicationContent.xml中使用<context:property-placeholder location="classpath:spring/jdbc.proper...
2019-11-12 17:09:15 129
原创 Spring3.0 对于@Configuration的使用
Spring3.0 对于Configuration的使用引用文本 这是本人的第一篇文章,若有问题欢迎指出起因:近期做了一个项目,由两家公司合作开发一个项目。由于某些原因,不使用调接口的方式进行研发。具体是由我方提供一个jar包给,他方将我方的jar包打入项目中,通过注入Service的方式调用。主要因为没有沟通好的缘故,我是用Springboot开发的,他们是用Spring3.0开发的,导...
2019-11-12 14:32:13 315
空空如也
SpringSecurity中 clearAuthentication设置的疑惑
2022-11-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人