借助shiro框架中的api对密码进行md5加密
启动报错
在很多SpringBoot项目中,common或者parent 做了shiro依赖,这样其他模块项目 总是提示 No bean of type 'org.apache.shiro.realm.Realm' found
Action:
Please create bean of type 'Realm' or add a shiro.ini in the root classpath (src/main/resources/shiro.ini) or in the META-INF folder (src/main/resources/META-INF/shiro.ini).
其实就是SpringBoot自动加载机制,在
shiro-spring-boot-starter 有默认配置。所以需要屏蔽shiro
@SpringBootApplication( 输入 ShiroAutoConfiguration 把出现的三个匹配的项目排除 就可以了
@SpringBootApplication(exclude = {ShiroAnnotationProcessorAutoConfiguration.class, ShiroAutoConfiguration.class, ShiroBeanAutoConfiguration.class})