Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a complete permission architecture based on springboot+bootstrap+mysql+redis

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of how to build a complete permission architecture based on springboot+bootstrap+mysql+redis, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to build a complete permission architecture based on springboot+bootstrap+mysql+redis. Let's take a look.

First, introduce the packaged bootstrap script into our existing project, as follows:

At this point, the introduction of our bootstraop framework is complete, so based on the bootstrap framework, we now begin to develop our first bootstrap page landing page, open our templates file and find our login.html page below, and re-edit the page code as follows:

Login page body {padding-top: 50px;} .starter-template {padding: 40px 15px; text-align: center;} has been logged out successfully

Use the account password to log in to the account Password

Reload and run our program and we will see the effect of our brand new page as follows:

At this point, the home page of our login has been completed, and then we will develop the home page main.html after our successful login. When we write our home page, we need to redesign our database, so our existing table structure cannot support our entire business system, so we have redesigned our database as shown below:

Then we directly generate our database execution script and execute it in our database, and use the tools we developed in the previous chapter to quickly generate our code and modify our code according to our permission schema. the following is the structure of the modified code:

There are some CSS or js that we often use in our project. We don't want to make a reference on every page, so we create a new global reference to our project (create a folder include under templates and create an includebase.html file) as follows:

Through the rapid generation, modification and configuration of the above code, we can formally develop the home page after our login is successful. The code on the home page is as follows:

$(function () {/ / the connection that opens websocket after the page is loaded var options = new Array (); options.sockurl ='/ ricky-websocket'; options.stompClienturl ='/ ricky/topic/greetings'; options.login = [${# authentication.name}]] Options.success = function (greeting) {var r = eval ("(" + JSON.parse (greeting.body) .content + ") alert (r); / / $(" # greetings ") .append ("+ JSON.parse (greeting.body) .socketConnect");} $.fn.socketConnect (options) / / initialize nav $.fn.bootstrapNav ({index:'main',navTitle:'XXXX management system'}) / / initialize the tab $("# tabContainer"). Tabs ({data: [{id: '99999999, text:' home', url: "home", closeable: false}], showIndex: 0 LoadAll: false}) / / $.fn.bootstrapTree ({url: "/ user/mainTree", treeId:'menu_tree',tabId: "tabContainer"}) $.fn.roomUtil ("/ dict/loadDict");})

John Smith Yesterday at 4:32 PM

Lorem ipsum dolor sit amet, consectetur...

John Smith Yesterday at 4:32 PM

Lorem ipsum dolor sit amet, consectetur...

John Smith Yesterday at 4:32 PM

Lorem ipsum dolor sit amet, consectetur...

Read All New Messages change password This is the end of the article on "how to build a complete permission architecture based on springboot+bootstrap+mysql+redis". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to build a complete authority framework based on springboot+bootstrap+mysql+redis". If you want to learn more, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report