Spring Boot OAuth2 authentication server construction and authorization code authentication demonstration

The JDK version used in this article is 1.8, and an OAuth 2.0 authentication server needs to be built to implement single sign-on for each system.

Framework idea

Here choose Spring Boot + Spring Security + Spring Authorization Server to implement, the specific version selection is as follows:

  • Spirng Boot 2.7.14, the latest version of Spring Boot is 3.1.2. In the official introduction, Spring Boot 3.x requires JDK 17 and above. For example, the requirements for 3.0.9 are:
    insert image description here

Although the lower version of 3.x (3.0.6) can also run in JDK 1.8, but to be on the safe side, the larger version of 2.x is selected.

  • The version of Spring Security follows Spring Boot, no need to specify it separately
  • Spring Authorization Server 0.4.3. The latest version of Spring Authorization Server is 1.1.1, but the lower version 1.0.3 of 1.x also requires JDK17 and above for JDK.

Note: When using Spring Boot's online project generator (https://start.spring.io/) to generate a project, if the Spring Boot version is 3.x, the minimum JDK version generated is JDK 17, Even with JDK 8 selected, the resulting pom.xml is JDK17.

Based on the above analysis, the version selection is as follows:

  • JDK 1.8
  • Sp

Guess you like

Origin blog.csdn.net/oscar999/article/details/131949251