Spring boot integration Shiro detailed tutorial (summary)

When we develop, we sometimes need to convert the traditional spring Shiro into a spring boot project or integrate it directly. We need to understand the relationship between XML configuration and spring bean code configuration. This is very important because there is no XML configuration file for spring boot (it is not absolute. Spring boot can also reference XML configuration)

Import dependency:

If you make an error and cannot find slf4j, introduce the dependency

The traditional XML configuration is as follows:

Convert to bean and create a new class shiroconfig

Some of them are custom interceptors and realms. At this time, spring can inject Shiro, that is, spring boot integrates Shiro

If you fail because of other configurations, you can refer to the spring boot version of the open source project lenos rapid development scaffold, which has the integration of Shiro and can be used to learn

Address: https://gitee.com/bweird/lenosp

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>