# ResourceServerSDK
**Repository Path**: NullPointerli/resource-server-sdk
## Basic Information
- **Project Name**: ResourceServerSDK
- **Description**: oauth2 资源服务器sdk
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2022-09-19
- **Last Updated**: 2023-08-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 工程简介
### 资源服务器公共依赖===sdk===服务
# 延伸阅读
### 先将spring中的maven打包修改为maven自身的打包
```xml
org.apache.maven.plugins
maven-compiler-plugin
1.8
1.8
```
**1.先执行clean**
**2.再执行install**
**3.将本地jar打进maven仓库中**
> 注释:
> -Dfile=jar文件所在路径
>
> -DgroupId=包名
>
> -DartifactId=项目名
>
> -Dversion=版本号
>
> -Dpackaging=jar
```xml
mvn install:install-file -Dfile=E:\ideaWorkSpace\权限\springsecurityoauth2-220915\oauth2\target\oauth2-0.0.1-SNAPSHOT.jar -DgroupId=com.example -DartifactId=oauth2 -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
```
**4.如果依赖没有打进去,修改maven仓库中的oauth2-0.0.1-SNAPSHOT.pom,将依赖补全(其依赖就是项目中的依赖);再引入的项目中刷新maven**
```xml
4.0.0
com.xxxxx
oauth2
0.0.1-SNAPSHOT
POM was created from install:install-file
1.8
UTF-8
UTF-8
2.3.12.RELEASE
Hoxton.SR12
2.2.8.RELEASE
org.projectlombok
lombok
true
org.springframework.cloud
spring-cloud-starter-oauth2
org.springframework.cloud
spring-cloud-starter-security
io.jsonwebtoken
jjwt
0.9.0
com.alibaba
fastjson
1.2.33
commons-collections
commons-collections
3.1
org.apache.commons
commons-lang3
commons-io
commons-io
2.4
org.apache.tomcat.embed
tomcat-embed-core
org.springframework.boot
spring-boot-dependencies
${spring-boot.version}
pom
import
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import
org.apache.maven.plugins
maven-compiler-plugin
1.8
1.8
```
### 其他项目引用
1.导入依赖
com.xxxxx
oauth2
0.0.1-SNAPSHOT
2.设置扫码类
```java
package com.example.test.configuration;
/**
* @author matianpei
* @date 2022/4/18
**/
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan(value="com.xxxxx.oauth2")//扫描指定包下的资源
public class ScanOauth2Config {
}
```