Spring Security OAuth2 Judges Dynamic Permissions Based on Request URI
GitHub address
Code cloud address
Usually we control permissions by @PreAuthorize("hasRole('ROLE_USER')) annotation, and configuring permission requirements in HttpSecurity. Here, we control access rights based on the requested URI, and we can use annotations to control access rights.
Create a new resource project to allocate resources and ...
Posted by bonekrusher on Sat, 12 Oct 2019 21:21:03 +0200
Building a Simple Multi-Person Chat System Based on SpringBoot+WebSocket
Preface
_Today, I Let's have a brief look.
What is WebSocket
Firstly, what is WebSocket? WebSocket is a protocol for full-duplex communication over a single TCP connection. This is a more official statement. In short, in a TCP connection, the two sides of the communication can communicate with each other. For example, when A and B are on the ph ...
Posted by wookie on Thu, 10 Oct 2019 14:20:48 +0200
Shopping Mall Project Server Practices SSM - ----- Front Desk Payment Interface (Payment in Sweep Payment in Face)
Payment of documents in person
Verification process:
Payment process:
Common Constants
package com.mmall.common;
import com.google.common.collect.Sets;
import java.util.Set;
//Setting Common Quantity
public class Const {
public static final String CURRENT_USER = "currentUser";
...
Posted by Cultureshock on Wed, 09 Oct 2019 18:16:12 +0200
Cookie and Session of Django
Cookie
Get Cookie
request.COOKIES['key']
request.get_signed_cookie('key', default=RAISE_ERROR, salt='', max_age=None)
The parameters of get_signed_cookie method:
default: default value
Salt: Encrypted salt
max_age: Background control expiration time
Set Cookie
rep = HttpResponse(...)
rep = render(request, ...)
rep.set_cookie(key,value,...) ...
Posted by johanlundin88 on Mon, 07 Oct 2019 12:53:36 +0200
Ubuntu Builds Tenorflow-gpu Edition Environment
Install graphics card driver
Installation of cuda 10.1.2
cuda official website: cuda-10.1
Installation Based on Installation Procedure on Official Website
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferenc ...
Posted by simonp on Wed, 02 Oct 2019 23:51:49 +0200
Spring Framework Learning Notes: Spring MVC Framework
Spring MVC framework is based on Spring framework, which can make it more convenient for us to develop the Web and realize front-end and back-end separation.
Ideas and principles
We defined a custom MVC framework just like Spring MVC, and both ideas are the same.
It is suggested to combine two articles for learning.
JSP Learning Notes (6) - Cus ...
Posted by Nicholas on Wed, 02 Oct 2019 16:05:41 +0200
7. Short Message Verification Code Login Based on Spring Security
Based on the analysis of the process of user login in SpringSecurity, we need to customize the following categories to implement the phone number plus verification code.
SmsCodeAuthenticationFilter
package com.liaoxiang.smsCodeLogin;
import org.springframework.security.authentication.AuthenticationSer ...
Posted by Danicek on Tue, 01 Oct 2019 17:37:40 +0200
Spring Cloud Microservice Learning
What is micro service?
A single application is divided into a group of small service components, each of which runs on its own process. The components interact with each other through lightweight mechanisms such as Restful API. These services are based on business capability and deployed independently b ...
Posted by boblang on Thu, 19 Sep 2019 07:48:56 +0200
Django Project: 3. User Registration Function
Supplementary Knowledge Points for the Content of this Chapter
Good order for importing libraries:
1. System libraries 2.django libraries 3. Self-defined libraries (third-party libraries)
redis caches database data call fast, but it is not conducive to long-term storage.
mysql is used for long-term storage, but calls are slow.
The sessi ...
Posted by and1c on Mon, 16 Sep 2019 15:46:14 +0200
Configure Linux to use LDAP user authentication
First issue of this article: https://www.cnblogs.com/somata/p/LinuxLDAPUserAuthentication.html
I use the LDAP user management completed by CentOS, which may be different from most of the online tutorials, but if I write it out, it will certainly be useful, but there will be some files, forget to teach.The OPENLdap used here cooperates with the ...
Posted by little_tris on Mon, 16 Sep 2019 10:48:21 +0200