Update pom.xml. README.md

pull/4/head
shengzhaoli.shengz 2023-10-12 14:50:03 +08:00
parent 7bfc2bf685
commit 5f7109380e
2 changed files with 210 additions and 221 deletions

View File

@ -1,9 +1,9 @@
## spring-oauth-server ## spring-oauth-server
<br/> <br/>
java config版本(Spring Boot) java config版本
<strong>Spring与OAuth2的整合示例</strong> <strong>Spring与OAuth2的整合示例OIDC1.x + OAuth2.1</strong>
项目用Maven管理 项目用Maven管理
@ -11,12 +11,13 @@ java config版本(Spring Boot)
Base on Spring-Boot Base on Spring-Boot
使用的技术与版本号 使用的主要技术与版本号
<ol> <ol>
<li>JDK (1.8.0_40)</li> <li>JDK (openjdk 17)</li>
<li>spring-security-oauth2 (2.3.8.RELEASE)</li> <li>Spring Boot(3.1.2)</li>
<li>spring-security-jwt (1.1.1.RELEASE)</li> <li>Spring Core(6.0.11)</li>
<li>Spring Boot(2.1.4.RELEASE)</li> <li>spring-security-oauth2-authorization-server (1.1.1)</li>
<li>thymeleaf (3.1.1.RELEASE)</li>
</ol> </ol>
<h3>授权协议</h3> <h3>授权协议</h3>
@ -31,6 +32,9 @@ Base on Spring-Boot
<li> <a href="https://v.youku.com/v_show/id_XMzg2Mjk0Mjk0MA==.html?f=51900110&o=1">在线测试环境的使用</a> 2018-10-14</li> <li> <a href="https://v.youku.com/v_show/id_XMzg2Mjk0Mjk0MA==.html?f=51900110&o=1">在线测试环境的使用</a> 2018-10-14</li>
<li> <a href="https://v.youku.com/v_show/id_XNDMwMTg4MTQ5Mg==.html?f=51900110&o=1">spring-oauth-server v2.0.1更新内容简介</a> 2019-08-05</li> <li> <a href="https://v.youku.com/v_show/id_XNDMwMTg4MTQ5Mg==.html?f=51900110&o=1">spring-oauth-server v2.0.1更新内容简介</a> 2019-08-05</li>
</ol> </ol>
> 注意以上视频主要适用于v2.x版本
<a href="http://list.youku.com/albumlist/show/id_51900110.html" target="_blank">http://list.youku.com/albumlist/show/id_51900110.html</a> <a href="http://list.youku.com/albumlist/show/id_51900110.html" target="_blank">http://list.youku.com/albumlist/show/id_51900110.html</a>
(持续更新...) (持续更新...)
<br/> <br/>
@ -48,17 +52,16 @@ Base on Spring-Boot
<strong>Redis版本请访问Branch: <a href="https://gitee.com/shengzhao/spring-oauth-server/tree/config-redis/"> <strong>Redis版本请访问Branch: <a href="https://gitee.com/shengzhao/spring-oauth-server/tree/config-redis/">
config-redis</a></strong> config-redis</a></strong>
<hr/> <hr/>
<h3>相关项目</h3> <h3>相关项目</h3>
<h4>
OAuth2客户端项目请访问 <a href="https://gitee.com/mkk/spring-oauth-client">spring-oauth-client</a> 1. OAuth2客户端项目请访问 <a href="https://gitee.com/mkk/spring-oauth-client">spring-oauth-client</a>
</h4>
<h4> 2. 在线测试访问地址 <a href="https://andaily.com/spring-oauth-server">https://andaily.com/spring-oauth-server</a>
在线测试访问地址 <a href="http://andaily.com/spring-oauth-server/">http://andaily.com/spring-oauth-server/</a>
</h4> 3. Shiro与OLTU整合的OAuth2项目 <a href="https://gitee.com/mkk/oauth2-shiro">https://gitee.com/mkk/oauth2-shiro</a>
<h4>
Shiro与OLTU整合的OAuth2项目 <a href="https://gitee.com/mkk/oauth2-shiro">https://gitee.com/mkk/oauth2-shiro</a>
(相比spring-oauth-server, 该项目入门门槛相对较低, 代码更加透明, 理解更容易,可扩展性更强, 且模块化开发) (相比spring-oauth-server, 该项目入门门槛相对较低, 代码更加透明, 理解更容易,可扩展性更强, 且模块化开发)
</h4>
<hr/> <hr/>
<div> <div>

396
pom.xml
View File

@ -1,205 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.monkeyk</groupId> <groupId>com.monkeyk</groupId>
<artifactId>spring-oauth-server</artifactId> <artifactId>spring-oauth-server</artifactId>
<version>3.0.0</version> <version>3.0.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name> <name>${project.artifactId}</name>
<description>Spring OAuth Server (Spring Boot)</description> <description>Spring OAuth Server (Spring Boot)</description>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version> <version>3.1.2</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>17</java.version>
<spring.security.oauth.version>2.3.8.RELEASE</spring.security.oauth.version> <test.skip>false</test.skip>
<spring.security.jwt.version>1.1.1.RELEASE</spring.security.jwt.version> </properties>
<test.skip>false</test.skip>
</properties> <dependencies>
<dependencies> <dependency>
<groupId>org.springframework.boot</groupId>
<!-- Provided --> <artifactId>spring-boot-starter-oauth2-authorization-server</artifactId>
<dependency> <exclusions>
<groupId>org.springframework.boot</groupId> <exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId> <groupId>org.apache.logging.log4j</groupId>
<scope>provided</scope> <artifactId>log4j-to-slf4j</artifactId>
</dependency> </exclusion>
<dependency> </exclusions>
<groupId>org.apache.tomcat.embed</groupId> </dependency>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope> <dependency>
</dependency> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<dependency> </dependency>
<groupId>org.springframework.boot</groupId> <dependency>
<artifactId>spring-boot-starter-security</artifactId> <groupId>org.thymeleaf.extras</groupId>
</dependency> <artifactId>thymeleaf-extras-springsecurity6</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <dependency>
</dependency> <groupId>org.springframework.boot</groupId>
<dependency> <artifactId>spring-boot-starter-validation</artifactId>
<groupId>org.springframework.boot</groupId> </dependency>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <dependency>
<dependency> <groupId>org.springframework.boot</groupId>
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId>
<artifactId>spring-boot-starter-jdbc</artifactId> </dependency>
</dependency>
<!-- OAuth2--> <!--Redis-->
<dependency> <!--<dependency>-->
<groupId>org.springframework.security.oauth</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-security-oauth2</artifactId> <!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
<version>${spring.security.oauth.version}</version> <!--</dependency>-->
</dependency>
<!-- JWT --> <dependency>
<dependency> <groupId>org.apache.commons</groupId>
<groupId>org.springframework.security</groupId> <artifactId>commons-lang3</artifactId>
<artifactId>spring-security-jwt</artifactId> </dependency>
<version>${spring.security.jwt.version}</version> <!--HikariCP-->
</dependency> <dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<!--Redis--> </dependency>
<!--<dependency>--> <dependency>
<!--<groupId>org.springframework.boot</groupId>--> <groupId>com.mysql</groupId>
<!--<artifactId>spring-boot-starter-data-redis</artifactId>--> <artifactId>mysql-connector-j</artifactId>
<!--</dependency>--> </dependency>
<dependency>
<groupId>org.springframework.security</groupId> <!-- unit test -->
<artifactId>spring-security-taglibs</artifactId> <dependency>
<version>4.2.3.RELEASE</version> <groupId>org.springframework.boot</groupId>
<exclusions> <artifactId>spring-boot-starter-test</artifactId>
<exclusion> <scope>test</scope>
<groupId>org.springframework.security</groupId> <exclusions>
<artifactId>spring-security-acl</artifactId> <exclusion>
</exclusion> <groupId>org.apache.logging.log4j</groupId>
<exclusion> <artifactId>log4j-to-slf4j</artifactId>
<groupId>org.springframework</groupId> </exclusion>
<artifactId>spring-beans</artifactId> </exclusions>
</exclusion> </dependency>
<exclusion> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework.restdocs</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-restdocs-mockmvc</artifactId>
</exclusion> <scope>test</scope>
<exclusion> </dependency>
<groupId>org.springframework</groupId> <dependency>
<artifactId>spring-expression</artifactId> <groupId>org.bitbucket.b_c</groupId>
</exclusion> <artifactId>jose4j</artifactId>
</exclusions> <version>0.9.3</version>
</dependency> <scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId> </dependencies>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope> <build>
</dependency>
<finalName>${project.artifactId}</finalName>
<dependency> <plugins>
<groupId>commons-lang</groupId> <plugin>
<artifactId>commons-lang</artifactId> <groupId>org.springframework.boot</groupId>
<version>2.6</version> <artifactId>spring-boot-maven-plugin</artifactId>
</dependency> </plugin>
<!--HikariCP-->
<dependency> <!-- spring-doc since v3.0.0 -->
<groupId>com.zaxxer</groupId> <plugin>
<artifactId>HikariCP</artifactId> <groupId>org.asciidoctor</groupId>
</dependency> <artifactId>asciidoctor-maven-plugin</artifactId>
<version>2.2.1</version>
<dependency> <executions>
<groupId>org.sitemesh</groupId> <execution>
<artifactId>sitemesh</artifactId> <id>generate-docs</id>
<version>3.0.1</version> <phase>prepare-package</phase>
</dependency> <goals>
<goal>process-asciidoc</goal>
<dependency> </goals>
<groupId>javax.servlet</groupId> <configuration>
<artifactId>jstl</artifactId> <backend>html</backend>
</dependency> <doctype>book</doctype>
<attributes>
<project-version>${project.version}</project-version>
<!--Test--> <project-id>${project.artifactId}</project-id>
<dependency> </attributes>
<groupId>org.springframework.boot</groupId> </configuration>
<artifactId>spring-boot-starter-test</artifactId> </execution>
<scope>test</scope> </executions>
</dependency> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.restdocs</groupId>
<artifactId>spring-security-test</artifactId> <artifactId>spring-restdocs-asciidoctor</artifactId>
<scope>test</scope> <version>${spring-restdocs.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin>
<build>
<plugin>
<finalName>${project.artifactId}</finalName> <artifactId>maven-jar-plugin</artifactId>
<configuration>
<plugins> <archive>
<plugin> <addMavenDescriptor>false</addMavenDescriptor>
<groupId>org.springframework.boot</groupId> <manifestEntries>
<artifactId>spring-boot-maven-plugin</artifactId> <Implementation-BuildNumber>${project.version}</Implementation-BuildNumber>
</plugin> <Implementation-Title>spring-oauth-server(boot)</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<plugin> <Implementation-URL>https://monkeyk.com</Implementation-URL>
<artifactId>maven-war-plugin</artifactId> <Implementation-Vendor>CloudJac, Inc.</Implementation-Vendor>
<configuration> </manifestEntries>
<failOnMissingWebXml>false</failOnMissingWebXml> <manifest>
<warSourceExcludes>*/classes/application.properties</warSourceExcludes> <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<!-- <packagingExcludes>*/classes/application.properties</packagingExcludes>--> </manifest>
<archive> </archive>
<addMavenDescriptor>false</addMavenDescriptor> </configuration>
<manifestEntries> </plugin>
<Implementation-BuildNumber>${project.version}</Implementation-BuildNumber>
<Implementation-Title>spring-oauth-server(boot)</Implementation-Title> <plugin>
<Implementation-Version>${project.version}</Implementation-Version> <artifactId>maven-surefire-plugin</artifactId>
<Implementation-URL>http://monkeyk.com</Implementation-URL> <configuration>
<Implementation-Vendor>Not Vendor Yet, Inc.</Implementation-Vendor> <skip>${test.skip}</skip>
</manifestEntries> <includes>
<manifest> <include>**/*Test.java</include>
<!--<mainClass>${start-class}</mainClass>--> </includes>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries> </configuration>
</manifest> </plugin>
</archive> </plugins>
</configuration> </build>
</plugin>
<developers>
<plugin> <developer>
<artifactId>maven-surefire-plugin</artifactId> <name>shengzhao</name>
<configuration> <email>shengzhao@shengzhaoli.com</email>
<skip>${test.skip}</skip> </developer>
<forkMode>none</forkMode> <!--more developer-->
<includes> </developers>
<include>**/*Test.java</include>
</includes> </project>
</configuration>
</plugin>
</plugins>
</build>
<developers>
<developer>
<name>shengzhao</name>
<email>shengzhao@shengzhaoli.com</email>
</developer>
<!--more developer-->
</developers>
</project>