Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the steps for SpringBoot to integrate Shiro?

Shulou Source: shulou.com Published: 2022-05-31 22:47:01 11月13日 Update

Today, I will talk to you about the steps of SpringBoot integration Shiro, which may not be well understood by many people. In order to let you know more, Xiaobian summarized the following contents for you. I hope you can gain something according to this article.

SpringBoot integrates Shiro, which is very simple because of shiro-spring-boot-web-starter. But many people in the group are still using native integration methods. I'm very anxious to see it. One of Boot's characteristics completely makes you "commit suicide". This caused him to find trouble for himself. Not only did he spend multiple times of time, but he could not integrate it and made all kinds of fancy mistakes! Take a look at my integration method, simple 4 steps to get it done!

The first step is to introduce the corresponding starter.

Step 2: Create a MyRealm. In the actual project, here is the database.

Step 3: Make a simple configuration of Shiro. The basic configuration information related to Shiro configured in the application.properties file is as follows:

Step 4: Configure ShiroConfig. The entire integration process is now complete. Let's write another Controller to test the real example. I won't take screenshots of the test results. You can verify them yourself. After reading the above, do you have any further understanding of what SpringBoot's steps are to integrate Shiro? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

Tags: Integration configuration content steps methods testing anxiety examples information basic configuration actually that is multiples screenshots data databases files time more features Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Tech Info Shulou Technology Xiaomi MariaDB