Compare commits

...

12 Commits
main ... lzm

Author SHA1 Message Date
廖忠美 083e21da00 秒杀 2024-07-13 11:49:13 +08:00
廖忠美 5c9259a7bf 111优化 2024-07-04 21:44:37 +08:00
廖忠美 ee05b5ba7f 数据输出 2024-07-04 20:31:08 +08:00
廖忠美 c8165f1f14 数据源,规则,任务增删改查完毕 2024-06-28 11:57:27 +08:00
廖忠美 1a98a81274 数据源,规则,任务增删改查完毕 2024-06-27 16:27:07 +08:00
廖忠美 a0846013d5 数据源,规则,任务增删改查完毕 2024-06-27 10:25:15 +08:00
廖忠美 fab9f96f28 数据源正常展示,permission控制层待测试 2024-06-26 20:22:50 +08:00
廖忠美 6a8a0af1cc 登陆成功,permission控制层待测试 2024-06-26 10:30:11 +08:00
廖忠美 407642d8b5 登陆代码优化,面向方法编程,优化ing 2024-06-24 15:38:13 +08:00
廖忠美 0238e2960d 登陆成功返回token,并能刷新token,permission控制层待测试 2024-06-23 22:35:47 +08:00
廖忠美 0b57a8711f 登陆成功返回token,并能刷新token,permission控制层待测试 2024-06-23 20:45:58 +08:00
廖忠美 ebe18670ca spring boot 集成 shiro 2024-06-22 09:29:15 +08:00
425 changed files with 8900 additions and 263 deletions

1
.idea/.name 100644
View File

@ -0,0 +1 @@
pom.xml

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA" serialisationVersion="2">
<checkstyleVersion>10.14.2</checkstyleVersion>
<scanScope>JavaOnly</scanScope>
<copyLibs>true</copyLibs>
<option name="thirdPartyClasspath" />
<option name="activeLocationIds" />
<option name="locations">
<list>
<ConfigurationLocation id="bundled-sun-checks" type="BUNDLED" scope="All" description="Sun Checks">(bundled)</ConfigurationLocation>
<ConfigurationLocation id="bundled-google-checks" type="BUNDLED" scope="All" description="Google Checks">(bundled)</ConfigurationLocation>
</list>
</option>
</component>
</project>

View File

@ -6,8 +6,14 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="etl-jwt-manage" />
<module name="product_seckill_server" />
<module name="etl-database-common" />
<module name="etl-auth-server" />
<module name="etl-database-server" />
<module name="etl-common" />
<module name="etl-gateway" />
<module name="product_seckill_common" />
</profile>
</annotationProcessing>
</component>

View File

@ -1,11 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-auth/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-auth/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/etl-database-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/etl-database-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/etl-database-server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/etl-database-server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-database/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-gateway/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-gateway/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-jwt-manage/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/etl-jwt-manage/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/product_seckill/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
</profile>
</component>

View File

@ -8,8 +8,8 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
<component name="SuppressionsComponent">
<option name="suppComments" value="[]" />
<component name="PDMPlugin">
<option name="skipTestSources" value="false" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AnalysisProjectProfileManager">
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<scopes />
<profiles>
<profile profile_name="Project Default" version="1.0" is_locked="false" />
</profiles>
<list size="0" />
</component>
</project>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -4,7 +4,144 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="e53020f6-f301-415a-a26a-d22b9ac05907" name="更改" comment="" />
<list default="true" id="780b98ac-4825-49af-9b82-c9afe419623b" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/.idea/.name" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/java/com/auth/common/entity/PathPermission.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/java/com/auth/common/entity/RolesPermission.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/java/com/auth/common/entity/UserAccount.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/src/main/java/com/auth/common/enums/PermissionConstants.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-common/target/etl-common-1.0-SNAPSHOT.jar.original" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/AccessItem.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/AnalyticWay.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/InterFace.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/RequestType.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/req/InterFaceReq.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/resp/InterResp.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/AccessItem.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/AnalyticWay.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/InterFace.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/RequestType.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/req/InterFaceReq.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/resp/InterResp.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/config/MybatisPlusConfig.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/controller/InterfaceController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/mapper/InterFaceMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/InterFaceService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/InterFaceServiceImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/config/MybatisPlusConfig.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/controller/InterfaceController.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/mapper/InterFaceMapper.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/InterFaceService.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/impl/InterFaceServiceImpl.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/pom.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/pom.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/product_seckill_common.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/java/com/seckill/common/entity/Product.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/java/com/seckill/common/entity/Seckill.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/java/com/seckill/common/entity/meta/BaseMeta.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/src/main/java/com/seckill/common/entity/req/SeckillReq.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/target/classes/com/seckill/common/entity/Product.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/target/classes/com/seckill/common/entity/Seckill.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/target/classes/com/seckill/common/entity/meta/BaseMeta.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_common/target/classes/com/seckill/common/entity/req/SeckillReq.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/pom.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/product_seckill_server.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/ProductSeckillServerApplication.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/config/MinioConfig.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/controller/MinioController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/controller/SeckillController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/mapper/ProductMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/mapper/SeckillMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/service/SeckillService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/java/com/product/seckill/server/service/impl/SeckillServiceImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/resources/bootstrap.yml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/main/resources/static/index.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/src/test/java/com/product/seckill/server/ProductSeckillServerApplicationTests.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/bootstrap.yml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/ProductSeckillServerApplication.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/config/MinioConfig.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/controller/MinioController.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/controller/SeckillController.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/mapper/ProductMapper.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/mapper/SeckillMapper.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/service/SeckillService.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/com/product/seckill/server/service/impl/SeckillServiceImpl.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/product_seckill/product_seckill_server/target/classes/static/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-common/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/config/ShiroConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/config/ShiroConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/controller/PermissionController.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/controller/PermissionController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/service/impl/PermissionServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/service/impl/PermissionServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/service/impl/UserManageServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/service/impl/UserManageServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/util/UserRealm.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/src/main/java/com/auth/server/util/UserRealm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/etl-auth-server-1.0-SNAPSHOT.jar" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/maven-archiver/pom.properties" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-auth/etl-auth-server/target/test-classes/com/auth/server/EtlAuthServerApplicationTests.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/handler/ExceptionHandlers.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/handler/ExceptionHandlers.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/result/Result.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/result/Result.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/util/RestTemplateUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/src/main/java/com/etl/common/util/RestTemplateUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/target/classes/com/etl/common/util/RestTemplateUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/target/classes/com/etl/common/util/RestTemplateUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/target/etl-common-1.0-SNAPSHOT.jar" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/target/etl-common-1.0-SNAPSHOT.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/target/maven-archiver/pom.properties" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/target/maven-archiver/pom.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/etl-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-common/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-common/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/DataSources.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/DataSources.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/req/DataSourceReq.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-common/src/main/java/com/etl/database/common/entity/req/DataSourceReq.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/DataSources.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/DataSources.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/req/DataSourceReq.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-common/target/classes/com/etl/database/common/entity/req/DataSourceReq.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/controller/CodeTypeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/controller/CodeTypeController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/controller/MysqlController.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/controller/MysqlController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/exception/GlobalExceptionHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/exception/GlobalExceptionHandler.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/MysqlService.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/MysqlService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/DataSouceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/DataSouceServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/FileServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/FileServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/MysqlServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/MysqlServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/RedisServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/RedisServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/RuleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/RuleServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/TaskServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/src/main/java/com/etl/database/server/service/impl/TaskServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/controller/CodeTypeController.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/controller/CodeTypeController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/controller/MysqlController.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/controller/MysqlController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/MysqlService.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/MysqlService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/impl/MysqlServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/etl-database/etl-database-server/target/classes/com/etl/database/server/service/impl/MysqlServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-easycode/etl-easycode.iml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-common/etl-auth-common.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-easycode/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-easycode/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-easycode/src/main/java/com/service/impl/TUserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-easycode/src/main/java/com/service/impl/TUserServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-gateway/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/src/main/java/com/etl/gateway/config/IgnoreWhiteConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-gateway/src/main/java/com/etl/gateway/config/IgnoreWhiteConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/src/main/java/com/etl/gateway/filters/JwtAuthCheckFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-gateway/src/main/java/com/etl/gateway/filters/JwtAuthCheckFilter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/target/etl-gateway-1.0-SNAPSHOT.jar" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/target/maven-archiver/pom.properties" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/etl-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/etl-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-groovy/etl-groovy.iml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth-server/etl-auth-server.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-groovy/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-groovy/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/src/main/java/com/etl/jwt/util/JwtTokenUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/src/main/java/com/etl/jwt/util/JwtTokenUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/target/classes/META-INF/spring-configuration-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/target/classes/META-INF/spring-configuration-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/target/etl-jwt-manage-1.0-SNAPSHOT.jar" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/target/etl-jwt-manage-1.0-SNAPSHOT.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/target/maven-archiver/pom.properties" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/target/maven-archiver/pom.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/etl-jwt-manage/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-jwt-manage/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/etl-roles/etl-roles.iml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-auth/etl-auth.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-roles/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/etl-roles/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-roles/src/main/java/com/etl/roles/controlller/PermissionController.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-roles/src/main/java/com/etl/roles/controlller/PermissionController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/etl-roles/src/main/java/com/etl/roles/service/impl/PermissionServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/etl-roles/src/main/java/com/etl/roles/service/impl/PermissionServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -13,89 +150,117 @@
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="mavenHome" value="$PROJECT_DIR$/../../maven/apache-maven-3.6.3" />
<option name="userSettingsFile" value="D:\maven\apache-maven-3.6.3\conf\settings.xml" />
<option name="mavenHome" value="$PROJECT_DIR$/../../moven/apache-maven-3.6.3" />
<option name="useMavenConfig" value="false" />
<option name="userSettingsFile" value="D:\moven\apache-maven-3.6.3\conf\settings.xml" />
</MavenGeneralSettings>
</option>
<option name="importingSettings">
<MavenImportingSettings>
<option name="jdkForImporter" value="1.8" />
</MavenImportingSettings>
</option>
</component>
<component name="ProjectColorInfo">{
&quot;customColor&quot;: &quot;&quot;,
&quot;associatedIndex&quot;: 3
}</component>
<component name="ProjectId" id="2i5i5wT47d5w5d34MR4XOoCQo7s" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="MavenRunner">
<option name="jreName" value="1.8" />
</component>
<component name="ProjectId" id="2j8Y1HiBuXPYMpaaiMscMny6CKo" />
<component name="ProjectViewState">
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ApiPost:METDOD_SEND_RECORD:product_seckill_server": "{\"/seckill/findSeckillList\":[{\"url\":\"http://localhost:9199/seckill/findSeckillList\",\"header\":[{\"is_checked\":1.0,\"type\":\"Text\",\"value\":\"\"}],\"query\":[{\"is_checked\":1.0,\"type\":\"Text\",\"value\":\"\"}],\"rest\":[{\"is_checked\":1.0,\"type\":\"Text\",\"value\":\"\"}],\"requestBody\":\"{\\n \\\"title\\\": \\\"\\\",\\n \\\"status\\\": 1\\n}\",\"responseBody\":\"There was an error accessing to URL: http://localhost:9199/seckill/findSeckillList\\n\\n\\u003chtml\\u003e\\u003cbody\\u003e\\u003ch1\\u003eWhitelabel Error Page\\u003c/h1\\u003e\\u003cp\\u003eThis application has no explicit mapping for /error, so you are seeing this as a fallback.\\u003c/p\\u003e\\u003cdiv id\\u003d\\u0027created\\u0027\\u003eSat Jul 13 10:11:27 CST 2024\\u003c/div\\u003e\\u003cdiv\\u003eThere was an unexpected error (type\\u003dInternal Server Error, status\\u003d500).\\u003c/div\\u003e\\u003c/body\\u003e\\u003c/html\\u003e\",\"selectedItem\":\"POST\",\"time\":{\"date\":{\"year\":2024.0,\"month\":7.0,\"day\":13.0},\"time\":{\"hour\":10.0,\"minute\":11.0,\"second\":27.0,\"nano\":2.424441E8}}},{\"url\":\"http://localhost:9199/seckill/findSeckillList\",\"header\":[{\"is_checked\":1,\"type\":\"Text\",\"value\":\"\"}],\"query\":[{\"is_checked\":1,\"type\":\"Text\",\"value\":\"\"}],\"rest\":[{\"is_checked\":1,\"type\":\"Text\",\"value\":\"\"}],\"requestBody\":\"{\\n \\\"title\\\": \\\"\\\",\\n \\\"status\\\": 1\\n}\",\"responseBody\":\"{\\n \\\"code\\\": 0,\\n \\\"message\\\": \\\"success\\\",\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"12\\\",\\n \\\"name\\\": \\\"硬盘\\\",\\n \\\"productDesc\\\": \\\"测试\\\",\\n \\\"type\\\": \\\"6\\\",\\n \\\"typeIds\\\": \\\"1,2,6\\\",\\n \\\"img\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142129A001.png\\\",\\n \\\"carouselImages\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142133A002.png\\\",\\n \\\"commentCount\\\": null,\\n \\\"collectCount\\\": null,\\n \\\"brand\\\": \\\"1\\\",\\n \\\"status\\\": \\\"1\\\",\\n \\\"unit\\\": \\\"个\\\",\\n \\\"keywords\\\": \\\"手机\\\",\\n \\\"ruleId\\\": \\\"1\\\",\\n \\\"revision\\\": null,\\n \\\"data\\\": \\\"2\\\",\\n \\\"price\\\": null,\\n \\\"inventory\\\": null,\\n \\\"seckillId\\\": null\\n },\\n {\\n \\\"id\\\": \\\"15\\\",\\n \\\"name\\\": \\\"键盘\\\",\\n \\\"productDesc\\\": \\\"测试\\\",\\n \\\"type\\\": \\\"6\\\",\\n \\\"typeIds\\\": \\\"1,2,6\\\",\\n \\\"img\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142129A001.png\\\",\\n \\\"carouselImages\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142133A002.png\\\",\\n \\\"commentCount\\\": null,\\n \\\"collectCount\\\": null,\\n \\\"brand\\\": \\\"1\\\",\\n \\\"status\\\": \\\"1\\\",\\n \\\"unit\\\": \\\"个\\\",\\n \\\"keywords\\\": \\\"手机\\\",\\n \\\"ruleId\\\": \\\"1\\\",\\n \\\"revision\\\": null,\\n \\\"data\\\": \\\"2\\\",\\n \\\"price\\\": null,\\n \\\"inventory\\\": null,\\n \\\"seckillId\\\": null\\n },\\n {\\n \\\"id\\\": \\\"17\\\",\\n \\\"name\\\": \\\"手机3\\\",\\n \\\"productDesc\\\": \\\"测试\\\",\\n \\\"type\\\": \\\"6\\\",\\n \\\"typeIds\\\": \\\"1,2,6\\\",\\n \\\"img\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142129A001.png\\\",\\n \\\"carouselImages\\\": \\\"http://127.0.0.1:9300/statics/2022/09/27/7GHOYz1SWffN43a77d257b422464c35bc1da44fc6742_20220927142133A002.png\\\",\\n \\\"commentCount\\\": null,\\n \\\"collectCount\\\": null,\\n \\\"brand\\\": \\\"1\\\",\\n \\\"status\\\": \\\"1\\\",\\n \\\"unit\\\": \\\"个\\\",\\n \\\"keywords\\\": \\\"手机\\\",\\n \\\"ruleId\\\": \\\"1\\\",\\n \\\"revision\\\": null,\\n \\\"data\\\": \\\"2\\\",\\n \\\"price\\\": null,\\n \\\"inventory\\\": null,\\n \\\"seckillId\\\": null\\n }\\n ]\\n}\",\"selectedItem\":\"POST\",\"time\":{\"date\":{\"year\":2024,\"month\":7,\"day\":13},\"time\":{\"hour\":10,\"minute\":12,\"second\":38,\"nano\":61490900}}}]}",
"RequestMappingsPanelOrder0": "0",
"RequestMappingsPanelOrder1": "1",
"RequestMappingsPanelWidth0": "75",
"RequestMappingsPanelWidth1": "75",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "D:/workspace/etl-cloud",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
"spring.configuration.checksum": "a925cb78a857f19db6d9680ed9c97ee6",
"last_opened_file_path": "D:/实训二/2.5-dev/pom.xml",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.2",
"settings.editor.selected.configurable": "reference.projectsettings.compiler.javacompiler",
"spring.configuration.checksum": "ffed7c98082a0bdac238fbca446fb574",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="RunManager">
<configuration name="EtlGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="etl-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.etl.gateway.EtlGatewayApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.etl.gateway.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="com.product.seckill.server.mapper" />
</key>
</component>
<component name="RunDashboard">
<option name="configurationTypes">
<set>
<option value="SpringBootApplicationConfigurationType" />
</set>
</option>
</component>
<component name="RunManager" selected="Spring Boot.ProductSeckillServerApplication">
<configuration name="EtlAuthServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="etl-auth-server" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.auth.server.EtlAuthServerApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Spring Boot.EtlGatewayApplication" />
</list>
</recent_temporary>
<configuration name="EtlDatabaseServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="etl-database-server" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.etl.database.server.EtlDatabaseServerApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="EtlGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="etl-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.etl.gateway.EtlGatewayApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="ProductSeckillServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="product_seckill_server" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.product.seckill.server.ProductSeckillServerApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Spring Boot.EtlAuthServerApplication" />
<item itemvalue="Spring Boot.EtlGatewayApplication" />
<item itemvalue="Spring Boot.EtlDatabaseServerApplication" />
<item itemvalue="Spring Boot.ProductSeckillServerApplication" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="e53020f6-f301-415a-a26a-d22b9ac05907" name="更改" comment="" />
<created>1718786660406</created>
<task active="true" id="Default" summary="Default task">
<changelist id="780b98ac-4825-49af-9b82-c9afe419623b" name="Changes" comment="" />
<created>1710157283817</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1718786660406</updated>
<workItem from="1718786662962" duration="189000" />
<workItem from="1718786877196" duration="128000" />
<workItem from="1718787019689" duration="267000" />
<workItem from="1718787313341" duration="265000" />
<updated>1710157283817</updated>
<workItem from="1720769957541" duration="21000" />
<workItem from="1720770004343" duration="12851000" />
<workItem from="1720835792392" duration="5796000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@ -0,0 +1,70 @@
<?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"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bwie</groupId>
<artifactId>etl-auth</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
<artifactId>etl-auth-common</artifactId>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>com.bwie</groupId>
<artifactId>etl-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,33 @@
package com.auth.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_data_source")
public class PathPermission {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "权限代号")
private String permissionCode;
@ApiModelProperty(value = "路由层次")
private String hierarchy;
@ApiModelProperty(value = "路由")
private String path;
@ApiModelProperty(value = "功能描述")
private String description;
@ApiModelProperty(value = "状态 0-废弃 1-正在使用")
private boolean status;
}

View File

@ -0,0 +1,24 @@
package com.auth.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@TableName("t_role_source")
@AllArgsConstructor
@NoArgsConstructor
public class RolesPermission {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "权限代号")
private String permissionCode;
@ApiModelProperty(value = "角色")
private String role;
}

View File

@ -0,0 +1,26 @@
package com.auth.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@TableName("t_user")
public class UserAccount {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty("角色")
private String roles;
@ApiModelProperty("名称")
private String username;
@ApiModelProperty("密码/")
private String password;
// @ApiModelProperty("uuid")
// private String UUID;
}

View File

@ -0,0 +1,13 @@
package com.auth.server.enums;
public class PermissionConstants {
public static final String ROLES = "roles";
public static final String CODE_LIST = "codeList";
public static final String ROLE = "role";
public static final String PERMISSION_CODE = "permission_code";
public static final String USER_CACHE_KEY = "user:username:";
public static final String USER_KEY = "user:key:";
public static final String USER_NAME = "username";
public static final String USER_ID = "userId";
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@ -0,0 +1,135 @@
<?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"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bwie</groupId>
<artifactId>etl-auth</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>etl-auth-server</artifactId>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--shiro-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>com.bwie</groupId>
<artifactId>etl-jwt-manage</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.bwie</groupId>
<artifactId>etl-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.4.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>3.1.7</version>
</dependency>
<!--shiro-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.auth.server.EtlAuthServerApplication</mainClass>
</configuration>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,25 @@
package com.auth.server;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@SpringBootApplication
@MapperScan("com.auth.server.mapper")
@ComponentScan(basePackages = {"com.etl.jwt.util", "com.etl.jwt.config",
"com.auth.server.controller","com.auth.server.service","com.auth.server.service.impl","com.auth.server.config"})
public class EtlAuthServerApplication {
public static void main(String[] args) {
SpringApplication.run(EtlAuthServerApplication.class, args);
}
@Bean
public BCryptPasswordEncoder encryptPasswordEncoder(){
return new BCryptPasswordEncoder();
}
}

View File

@ -0,0 +1,44 @@
package com.auth.server.config;
import org.apache.http.util.TextUtils;
import org.apache.shiro.crypto.hash.HashRequest;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/*
* MD5
*/
public class MD5s {
public static String md5(String string) {
if (TextUtils.isEmpty(string)) {
return "";
}
MessageDigest md5 = null;
try {
md5 = MessageDigest.getInstance("MD5");
byte[] bytes = md5.digest(string.getBytes());
String result = "";
for (byte b : bytes) {
String temp = Integer.toHexString(b & 0xff);
if (temp.length() == 1) {
temp = "0" + temp;
}
result += temp;
}
return result;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
HashRequest request = new HashRequest.Builder()
.setAlgorithmName("MD5") // 使用 SHA-256 算法
.setSource(string.getBytes()) // 要散列的密码(作为字节数组)
.build();
//passwordService.encryptPassword(request);
return "";
}
}

View File

@ -0,0 +1,69 @@
package com.auth.server.config;
import com.auth.server.util.UserRealm;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.LinkedHashMap;
import java.util.Map;
@Configuration
public class ShiroConfig {
//此处用于实现授权功能,配置需要拦截的接口
//此处用于实现授权功能,配置需要拦截的接口
@Bean
public ShiroFilterFactoryBean getShiroFilterFactoryBean(@Qualifier("getDefaultWebSecurityManager") DefaultWebSecurityManager defaultWebSecurityManager) {
ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
shiroFilterFactoryBean.setSecurityManager(defaultWebSecurityManager);
//拦截页面
Map<String, String> filterMap = new LinkedHashMap();
//登录/登出,所有人的权限
filterMap.put("/user/login", "anon");
filterMap.put("/user/logout", "anon");
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterMap);
//未登录页面跳转
shiroFilterFactoryBean.setLoginUrl("/user/show");
//未有权限页面跳转
shiroFilterFactoryBean.setUnauthorizedUrl("/user/unauthorized");
return shiroFilterFactoryBean;
}
//注入对应的userRealm类
@Bean
public DefaultWebSecurityManager getDefaultWebSecurityManager(@Qualifier("userRealm") UserRealm userRealm) {
DefaultWebSecurityManager SecurityManager = new DefaultWebSecurityManager();
SecurityManager.setRealm(userRealm);
return SecurityManager;
}
@Bean
public UserRealm userRealm() {
UserRealm userRealm = new UserRealm();
//注册MD5加密
userRealm.setCredentialsMatcher(hashedCredentialsMatcher());
return userRealm;
}
/**
* shiro
* @return HashedCredentialsMatcher
*/
@Bean
public HashedCredentialsMatcher hashedCredentialsMatcher(){
HashedCredentialsMatcher hashedCredentialsMatcher = new HashedCredentialsMatcher();
// 使用md5 算法进行加密
hashedCredentialsMatcher.setHashAlgorithmName("MD5");
// 设置散列次数: 意为加密几次
hashedCredentialsMatcher.setHashIterations(2);
return hashedCredentialsMatcher;
}
}

View File

@ -0,0 +1,84 @@
package com.auth.server.controller;
import com.alibaba.fastjson2.JSON;
import com.alibaba.nacos.api.model.v2.Result;
import com.auth.server.entity.UserAccount;
import com.auth.server.service.UserManageService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.etl.common.enums.ResponseCodeEnum;
import com.etl.common.result.CommonResult;
import com.etl.jwt.util.JwtTokenUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.apache.shiro.realm.SimpleAccountRealm;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
/**
* controller
*/
@RestController
@Slf4j
@Api(tags = "登录-API")
@RequestMapping("/user")
public class LoginControler {
@Autowired
private UserManageService userManageService;
/**
* (使)
*
* @param user
* @return
*/
@ApiOperation(value = "用户登录")
@ApiOperationSupport(author = "liz")
@RequestMapping(value = "/login", method = RequestMethod.POST)
public Result<Object> userLogin(@RequestBody UserAccount user) {
return userManageService.userLogin(user);
}
/**
* JWT,
*
* header
*/
/**
* JWT access_token access_token使
* JWT 使 JWT access_token access_token
* 使refresh tokentoken
* <p>
* refresh_token access_token access_token refresh_token
* redis
*
* @param token
* @return
*/
@RequestMapping(value = "/token/refresh", method = RequestMethod.GET)
@ApiOperation(value = "刷新令牌")
@ApiOperationSupport(author = "liz")
public CommonResult<Object> refreshToken(@RequestHeader(value = "${auth.jwt.header}") String token) {
return userManageService.refreshToken(token);
}
}

View File

@ -0,0 +1,52 @@
package com.auth.server.controller;
import com.auth.server.entity.PathPermission;
import com.auth.server.entity.RolesPermission;
import com.auth.server.enums.PermissionConstants;
import com.auth.server.service.PathService;
import com.auth.server.service.PermissionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* controller
*/
@RestController
@Api(tags ="权限-API")
@RequestMapping("/permission")
public class PermissionController {
@Autowired
private PermissionService permissionService;
@Resource
private PathService pathService;
@PostMapping("/permission/add")
public boolean permissionAdd(@RequestBody Map<String,Object> map) {
String roles = (String) map.get(PermissionConstants.ROLES);
List<String> codeList = (List<String>) map.get(PermissionConstants.CODE_LIST);
return permissionService.permissionAdd(roles, codeList);
}
@GetMapping("/get")
public List<String> pathGet(@RequestParam("roles") String roles) {
RolesPermission permission = permissionService.getOne(new QueryWrapper<RolesPermission>().eq(PermissionConstants.ROLE,roles));
String codes = StringUtils.strip(permission.getPermissionCode(), "[]");
List<String> list = Arrays.asList(codes.split(","));
List<String> pathList = new ArrayList();
for(String code:list){
String api = pathService.getOne(new QueryWrapper<PathPermission>().eq(PermissionConstants.PERMISSION_CODE,code.trim())).getPath();
pathList.add(api);
}
return pathList;
}
}

View File

@ -0,0 +1,33 @@
package com.auth.server.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_data_source")
public class PathPermission {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "权限代号")
private String permissionCode;
@ApiModelProperty(value = "路由层次")
private String hierarchy;
@ApiModelProperty(value = "路由")
private String path;
@ApiModelProperty(value = "功能描述")
private String description;
@ApiModelProperty(value = "状态 0-废弃 1-正在使用")
private boolean status;
}

View File

@ -0,0 +1,24 @@
package com.auth.server.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@TableName("t_role_source")
@AllArgsConstructor
@NoArgsConstructor
public class RolesPermission {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "权限代号")
private String permissionCode;
@ApiModelProperty(value = "角色")
private String role;
}

View File

@ -0,0 +1,26 @@
package com.auth.server.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@TableName("t_user")
public class UserAccount {
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty("角色")
private String roles;
@ApiModelProperty("名称")
private String username;
@ApiModelProperty("密码/")
private String password;
// @ApiModelProperty("uuid")
// private String UUID;
}

View File

@ -0,0 +1,13 @@
package com.auth.server.enums;
public class PermissionConstants {
public static final String ROLES = "roles";
public static final String CODE_LIST = "codeList";
public static final String ROLE = "role";
public static final String PERMISSION_CODE = "permission_code";
public static final String USER_CACHE_KEY = "user:username:";
public static final String USER_KEY = "user:key:";
public static final String USER_NAME = "username";
public static final String USER_ID = "userId";
}

View File

@ -0,0 +1,31 @@
//package com.auth.server.interceptor;
//import com.auth.server.mapper.UserMangeMapper;
//import org.springframework.web.servlet.HandlerInterceptor;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//public class UserInterceptor implements HandlerInterceptor {
// private UserMangeMapper userMangeMapper;
// public UserInterceptor(UserMangeMapper userMapper){
// this.userMangeMapper=userMapper;
// }
// @Override
// public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// HttpSession session = request.getSession();
// String username = (String) session.getAttribute("username");
// //数据库
// String UUID=userMangeMapper.getUUID(username);
// //session
// String uuid = (String)session.getAttribute("uuid");
// System.out.println("uuid = " + uuid);
// System.out.println("UUID = " + UUID);
// if(UUID.equals(uuid)){
// return true;
// }else {
// System.out.println("拦截"+request.getRequestURI());
// response.sendRedirect("/login");
// response.setStatus(401);
// return false;
// }
// }
//}

View File

@ -0,0 +1,8 @@
package com.auth.server.mapper;
import com.auth.server.entity.PathPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface PathMapper extends BaseMapper<PathPermission> {
}

View File

@ -0,0 +1,9 @@
package com.auth.server.mapper;
import com.auth.server.entity.RolesPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface PermissionMapper extends BaseMapper<RolesPermission> {
}

View File

@ -0,0 +1,13 @@
package com.auth.server.mapper;
import com.auth.server.entity.UserAccount;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserMangeMapper extends BaseMapper<UserAccount> {
}

View File

@ -0,0 +1,8 @@
package com.auth.server.service;
import com.auth.server.entity.PathPermission;
import com.baomidou.mybatisplus.extension.service.IService;
public interface PathService extends IService<PathPermission> {
}

View File

@ -0,0 +1,11 @@
package com.auth.server.service;
import com.auth.server.entity.RolesPermission;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
public interface PermissionService extends IService<RolesPermission> {
boolean permissionAdd(String roles, List<String> codeList);
}

View File

@ -0,0 +1,15 @@
package com.auth.server.service;
import com.alibaba.nacos.api.model.v2.Result;
import com.auth.server.entity.UserAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.etl.common.result.CommonResult;
public interface UserManageService extends IService<UserAccount> {
Result<Object> userLogin(UserAccount user);
CommonResult<Object> refreshToken(String token);
}

View File

@ -0,0 +1,16 @@
package com.auth.server.service.impl;
import com.auth.server.entity.PathPermission;
import com.auth.server.mapper.PathMapper;
import com.auth.server.mapper.PermissionMapper;
import com.auth.server.service.PathService;
import com.auth.server.service.PermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class PathServiceImpl extends ServiceImpl<PathMapper, PathPermission> implements PathService {
}

View File

@ -0,0 +1,62 @@
package com.auth.server.service.impl;
import com.auth.server.entity.RolesPermission;
import com.auth.server.enums.PermissionConstants;
import com.auth.server.mapper.PermissionMapper;
import com.auth.server.service.PermissionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service
@Slf4j
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, RolesPermission> implements PermissionService {
@Autowired
private PermissionMapper permissionMapper;
@Override
public boolean permissionAdd(String roles, List<String> codeList) {
RolesPermission rolesPermission = new RolesPermission();
rolesPermission.setRole(roles);
int result = 0;
RolesPermission role = getRoleByName(roles);
if (role != null) {
result = updateRolePermission(rolesPermission, role, codeList);
} else {
result = insertRolePermission(rolesPermission, codeList);
}
return result > 0;
}
private RolesPermission getRoleByName(String roleName) {
return permissionMapper.selectOne(new QueryWrapper<RolesPermission>().eq(PermissionConstants.ROLE, roleName));
}
private int updateRolePermission(RolesPermission rolesPermission, RolesPermission role, List<String> codeList) {
//去掉头尾括号,并转为列表
List<String> list = new java.util.ArrayList(Collections.singletonList(
StringUtils.strip(role.getPermissionCode(), "[]")));
//将新数据添加至列表
list.addAll(codeList);
rolesPermission.setPermissionCode(list.toString());
rolesPermission.setId(role.getId());
return permissionMapper.updateById(rolesPermission);
}
private int insertRolePermission(RolesPermission rolesPermission, List<String> codeList) {
if (codeList != null) {
rolesPermission.setPermissionCode(codeList.toString());
}
return permissionMapper.insert(rolesPermission);
}
}

View File

@ -0,0 +1,168 @@
package com.auth.server.service.impl;
import com.alibaba.fastjson2.JSON;
import com.alibaba.nacos.api.model.v2.Result;
import com.auth.server.config.MD5s;
import com.auth.server.entity.UserAccount;
import com.auth.server.enums.PermissionConstants;
import com.auth.server.mapper.UserMangeMapper;
import com.auth.server.service.UserManageService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.etl.common.enums.ResponseCodeEnum;
import com.etl.common.result.CommonResult;
import com.etl.jwt.util.JwtTokenUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.apache.shiro.realm.SimpleAccountRealm;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static java.lang.System.nanoTime;
@Service
@Slf4j
public class UserManageServiceImpl extends ServiceImpl<UserMangeMapper, UserAccount> implements UserManageService {
@Resource
private StringRedisTemplate stringRedisTemplate;
@Resource
private JwtTokenUtil jwtTokenUtil;
@Autowired
private UserMangeMapper UserMangeMapper;
@Override
public Result<Object> userLogin(UserAccount user) {
long startTime = nanoTime();
// 获取用户名
String username = user.getUsername();
// 获取密码
String password = user.getPassword();
// 参数校验
Result result = checkUser(username, password);
if (result != null) {
return result;
}
// 创建SimpleAccountRealm并添加账户信息
SimpleAccountRealm simpleAccountRealm = new SimpleAccountRealm();
// 确保这里添加的用户名和密码与用户提供的匹配
simpleAccountRealm.addAccount(username, password);
// 配置SecurityManager并设置Realm
DefaultSecurityManager securityManager = new DefaultSecurityManager(simpleAccountRealm);
securityManager.setRealm(simpleAccountRealm);
SecurityUtils.setSecurityManager(securityManager);
//shiro验证
Subject subject = SecurityUtils.getSubject();
//根据用户名密码生成一个令牌
AuthenticationToken token = new UsernamePasswordToken(username, password);
try {
//执行登录操作
subject.login(token);
//将用户信息存入redis
saveUserInfoToRedis(username, user);
} catch (UnknownAccountException e) {
log.info("登录用户不存在:{}", e);
return new Result(416, "用户不存在", username);
} catch (IncorrectCredentialsException e) {
log.info("登录密码错误:{}", e);
return new Result(412, "密码错误,请重新登录", password);
} catch (AuthenticationException e) {
log.warn("用户登录异常:" + e.getMessage());
return new Result(416, "账户异常", username);
}
String userInfo = stringRedisTemplate.opsForValue().get(PermissionConstants.USER_NAME + username);
UserAccount account = null;
if (userInfo != null) {
account = JSON.parseObject(userInfo, UserAccount.class);
} else {
//获取登录用户信息
account = UserMangeMapper.selectOne(new QueryWrapper<UserAccount>().eq(PermissionConstants.USER_NAME, username));
stringRedisTemplate.opsForValue().set(PermissionConstants.USER_NAME + username, JSON.toJSONString(account));
}
// 通过 jwtTokenUtil 生成 JWT 令牌和刷新令牌
Map<String, Object> tokenMap = jwtTokenUtil
.generateTokenAndRefreshToken(String.valueOf(account.getId()), username);
// 用户角色映射表中中查询用户角色
account.getRoles();
long endTime = nanoTime();
// 计算耗时(单位为纳秒)
long elapsedTime = endTime - startTime;
// 将耗时转换为毫秒
double elapsedTimeInMillis = elapsedTime / 1000000.0;
// 输出结果
System.out.println("程序运行耗时:" + elapsedTimeInMillis + " 毫秒");
return Result.success(tokenMap);
}
private void saveUserInfoToRedis(String username, UserAccount user) {
stringRedisTemplate.opsForValue().set(PermissionConstants.USER_CACHE_KEY + username,
JSON.toJSONString(user), 30 * 60, TimeUnit.MINUTES);
}
private Result checkUser(String username, String password) {
// 检查用户名和密码的合法性
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
return new Result(400, "用户名或密码不能为空");
}
if (username.length() < 3 || username.length() > 20) {
return new Result(400, "用户名长度必须在6-20个字符之间");
}
if (password.length() < 3 || password.length() > 20) {
return new Result(400, "密码长度必须在6-20个字符之间");
}
return null;
}
@Override
public CommonResult<Object> refreshToken(String token) {
token = com.auth.server.util.SecurityUtils.replaceTokenPrefix(token);
if (StringUtils.isEmpty(token)) {
return new CommonResult(ResponseCodeEnum.TOKEN_MISSION.getCode(),
ResponseCodeEnum.TOKEN_MISSION.getMessage());
}
// 对Token解签名并验证Token是否过期
boolean isJwtNotValid = jwtTokenUtil.isTokenExpired(token);
if (isJwtNotValid) {
return new CommonResult(ResponseCodeEnum.TOKEN_INVALID.getCode(),
ResponseCodeEnum.TOKEN_INVALID.getMessage());
}
// 验证 token 里面的 userId 是否为空
String userId = jwtTokenUtil.getUserIdFromToken(token);
String username = jwtTokenUtil.getUserNameFromToken(token);
if (StringUtils.isEmpty(userId)) {
return new CommonResult(ResponseCodeEnum.TOKEN_INVALID.getCode(),
ResponseCodeEnum.TOKEN_INVALID.getMessage());
}
// 这里为了保证 refreshToken 只能用一次,刷新后,会从 redis 中删除。
// 如果用的不是 redis 中的 refreshToken 进行刷新令牌,则不能刷新。
// 如果使用 redis 中已过期的 refreshToken 也不能刷新令牌。
boolean isRefreshTokenNotExisted = jwtTokenUtil.isRefreshTokenNotExistCache(token);
if (isRefreshTokenNotExisted) {
return new CommonResult(ResponseCodeEnum.REFRESH_TOKEN_INVALID.getCode(),
ResponseCodeEnum.REFRESH_TOKEN_INVALID.getMessage());
}
//String us = jwtTokenUtil.getUserIdFromToken(token);
Map<String, Object> tokenMap = jwtTokenUtil.refreshTokenAndGenerateToken(userId, username);
return new CommonResult(200, ResponseCodeEnum.SUCCESS.getMessage(), tokenMap);
}
}

View File

@ -0,0 +1,37 @@
package com.auth.server.util;
import com.etl.common.constants.TokenConstants;
import javax.servlet.http.HttpServletRequest;
import static org.apache.logging.log4j.util.Strings.isEmpty;
/**
*
*
*/
public class SecurityUtils
{
/**
* requesttoken
*/
public static String getToken(HttpServletRequest request)
{
// 从header获取token标识
String token = request.getHeader(TokenConstants.AUTHENTICATION);
return replaceTokenPrefix(token);
}
/**
* token
*/
public static String replaceTokenPrefix(String token) {
// 如果前端设置了令牌前缀,则裁剪掉前缀
if (!isEmpty(token) && token.startsWith(TokenConstants.PREFIX)) {
token = token.replaceFirst(TokenConstants.PREFIX, "");
}
return token;
}
}

View File

@ -0,0 +1,62 @@
package com.auth.server.util;
import com.auth.server.entity.UserAccount;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.auth.server.service.UserManageService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
public class UserRealm extends AuthorizingRealm {
@Autowired
private UserManageService userManageService;
//授权
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
/**
*Userroles
*
*/
SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
Subject subject= SecurityUtils.getSubject();
UserAccount currentUser =(UserAccount) subject.getPrincipal();
authorizationInfo.addStringPermission(currentUser.getRoles());
log.info("用户权限为:"+currentUser.getRoles());
return authorizationInfo;
}
//认证
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
UsernamePasswordToken token = (UsernamePasswordToken) authenticationToken;
//用户名/密码认证
//从接口处获取得到的用户名
String username = token.getUsername();
//调用mybatis_plus中的方法查询数据库中用户名对应的数据
QueryWrapper<UserAccount> wrapper = new QueryWrapper();
wrapper.eq("username",username);
UserAccount user=userManageService.getOne(wrapper);
//为空,即用户名不存在
if(user==null){
return null;
}else {
log.info(user.getUsername());
}
//principal认证的实体信息可以是username也可以是数据库表对应的用户的实体对象
// Object principal = user.getUsername();
ByteSource salt = ByteSource.Util.bytes(username);
return new SimpleAuthenticationInfo(user.getUsername(), user.getPassword() , salt,getName());
}
}

View File

@ -0,0 +1,51 @@
server:
port: 9092
spring:
application:
name: engine-auth
redis:
host: 115.159.33.152
port: 6379
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://115.159.33.152:3306/etl
username: root
password: lzm@123
mvc:
pathmatch:
matching-strategy: ant_path_matcher
profiles:
active: dev
cloud:
nacos:
#注册服务
discovery:
server-addr: 115.159.33.152:8848
namespace: f9f293d4-55ce-45c1-aa15-124ca461c060
# 配置
config:
server-addr: 115.159.33.152:8848
namespace: f9f293d4-55ce-45c1-aa15-124ca461c060
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
logging:
level:
com.bwie: DEBUG
auth:
jwt:
enabled: true # 是否开启JWT登录认证功能
secret: passjava # JWT 私钥用于校验JWT令牌的合法性
expiration: 1800000 # JWT 令牌的有效期用于校验JWT令牌的合法性半个小时
header: Authorization # HTTP 请求的 Header 名称,该 Header作为参数传递 JWT 令牌
userParamName: username # 用户登录认证用户名参数名称
pwdParamName: password # 用户登录认证密码参数名称
useDefaultController: true # 是否使用默认的JwtAuthController
skipValidUrl:
- /auth/login
- /auth/logout
mybatis-plus:
mapper-locations: classpath:/mapper/*mapper.xml
typeAliasesPackage: com.auth.common.entity

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.PathMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.PermissionMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.UserMangeMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<html>
<body>
<h1>hello word!!!</h1>
<p>this is a html page</p>
</body>
</html>

View File

@ -0,0 +1,31 @@
package com.auth.server;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@SpringBootTest
class EtlAuthServerApplicationTests {
@Autowired
private BCryptPasswordEncoder bCryptPasswordEncoder;
@Test
public void enCoder() {
String password="123";
String encode = bCryptPasswordEncoder.encode(password);
System.out.println("加密后的密码:"+encode);
}
@Test
public void matchesPassword(){
String encode="$2a$10$qyOS46MrKAm2wIyJl95.eO70ioBDvsgv8nnCCjhGJUxPIhPC56PTa";
boolean matches = bCryptPasswordEncoder.matches("123", encode);
if (matches){
System.out.println("密码正确");
}else {
System.out.println("密码错误");
}
}
}

View File

@ -0,0 +1,51 @@
server:
port: 9092
spring:
application:
name: engine-auth
redis:
host: 115.159.33.152
port: 6379
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://115.159.33.152:3306/etl
username: root
password: lzm@123
mvc:
pathmatch:
matching-strategy: ant_path_matcher
profiles:
active: dev
cloud:
nacos:
#注册服务
discovery:
server-addr: 115.159.33.152:8848
namespace: f9f293d4-55ce-45c1-aa15-124ca461c060
# 配置
config:
server-addr: 115.159.33.152:8848
namespace: f9f293d4-55ce-45c1-aa15-124ca461c060
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
logging:
level:
com.bwie: DEBUG
auth:
jwt:
enabled: true # 是否开启JWT登录认证功能
secret: passjava # JWT 私钥用于校验JWT令牌的合法性
expiration: 1800000 # JWT 令牌的有效期用于校验JWT令牌的合法性半个小时
header: Authorization # HTTP 请求的 Header 名称,该 Header作为参数传递 JWT 令牌
userParamName: username # 用户登录认证用户名参数名称
pwdParamName: password # 用户登录认证密码参数名称
useDefaultController: true # 是否使用默认的JwtAuthController
skipValidUrl:
- /auth/login
- /auth/logout
mybatis-plus:
mapper-locations: classpath:/mapper/*mapper.xml
typeAliasesPackage: com.auth.common.entity

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.PathMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.PermissionMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.auth.server.mapper.UserMangeMapper">
</mapper>

View File

@ -0,0 +1,6 @@
<html>
<body>
<h1>hello word!!!</h1>
<p>this is a html page</p>
</body>
</html>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

23
etl-auth/pom.xml 100644
View File

@ -0,0 +1,23 @@
<?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"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bwie</groupId>
<artifactId>etl-cloud</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>etl-auth</artifactId>
<packaging>pom</packaging>
<modules>
<module>etl-auth-common</module>
<module>etl-auth-server</module>
</modules>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
</properties>
</project>

6
etl-cloud.iml 100644
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@ -100,26 +100,15 @@
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.health.cloud.common.HealthCloudCommonApplication</mainClass>
<skip>true</skip>
<mainClass>com.auth.server.EtlAuthServerApplication</mainClass>
</configuration>
<executions>
<execution>
@ -132,6 +121,4 @@
</plugin>
</plugins>
</build>
</project>

View File

@ -21,4 +21,12 @@ public class TokenConstants {
* token
*/
public static final String TOKEN = "token";
/**
*
*/
public static final String AUTHENTICATION = "Authorization";
/**
*
*/
public static final String PREFIX = "Bearer ";
}

View File

@ -0,0 +1,29 @@
package com.etl.common.enums;
public enum ResponseCodeEnum {
SUCCESS(200, "成功"),
FAIL(412, "失败"),
LOGIN_ERROR(202, "用户名或密码错误"),
UNKNOWN_ERROR(500, "未知错误"),
PARAMETER_ILLEGAL(400, "参数不合法"),
TOKEN_INVALID(412, "token 已过期或验证不正确!"),
TOKEN_SIGNATURE_INVALID(403, "无效的签名"),
TOKEN_MISSION(403, "token 缺失"),
REFRESH_TOKEN_INVALID(412, "refreshToken 无效"),
LOGOUT_ERROR(444, "用户登出失败");
private final int code;
private final String message;
ResponseCodeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@ -0,0 +1,28 @@
package com.etl.common.exception;
public class LimitException extends RuntimeException {
private static final long serialVersionUID = 1L;
// 默认的构造函数
public LimitException() {
super();
}
// 带错误信息的构造函数
public LimitException(String message) {
super(message);
}
// 带错误信息和原因的构造函数
public LimitException(String message, Throwable cause) {
super(message, cause);
}
// 带原因的构造函数
public LimitException(Throwable cause) {
super(cause);
}
}

View File

@ -62,7 +62,7 @@ public class ExceptionHandlers {
.collect(Collectors.joining(";"));
result = Result.error(HttpStatus.BAD_REQUEST.value(), errorMessages);
}
return new ResponseEntity<>(result, HttpStatus.BAD_REQUEST);
return new ResponseEntity(result, HttpStatus.BAD_REQUEST);
}
/**

View File

@ -0,0 +1,22 @@
package com.etl.common.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T>{
private Integer code;
private String message;
private T data;
private int dataSize;
public CommonResult(Integer code,String message){
this(code,message,null,0);
}
public CommonResult(Integer code,String message,T data){
this(code,message,data,0);
}
}

View File

@ -70,7 +70,7 @@ public class Result<T> implements Serializable {
}
private static <T> Result<T> restResult(T data, int code, String msg) {
Result<T> apiResult = new Result<>();
Result<T> apiResult = new Result();
apiResult.setCode(code);
apiResult.setData(data);
apiResult.setMsg(msg);

View File

@ -16,21 +16,22 @@ public class RestTemplateUtil {
@Autowired
private RestTemplate restTemplate;
public JSONObject get(String url, Map<String, Object> queryParams) throws IOException {
return get(url, queryParams, new HashMap<>(1));
return get(url, queryParams, new HashMap(1));
}
public JSONObject get(String url, Map<String, Object> queryParams, Map<String, String> headerParams) throws IOException {
String tempUrl = setParamsByAppendUrl(queryParams, url);
HttpHeaders headers = new HttpHeaders();
headerParams.forEach(headers::add);
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(null, headers);
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity(null, headers);
ResponseEntity<String> response = restTemplate.exchange(tempUrl, HttpMethod.GET, httpEntity, String.class);
return JSONObject.parseObject(response.getBody());
}
public JSONObject get2(String url, Map<String, Object> queryParams, Map<String, String> headerParams) throws IOException {
String tempUrl = setParamsByPath(queryParams, url);
HttpHeaders headers = new HttpHeaders();
headerParams.forEach(headers::add);
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(null, headers);
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity(null, headers);
ResponseEntity<String> response = restTemplate.exchange(tempUrl, HttpMethod.GET, httpEntity, String.class, queryParams);
return JSONObject.parseObject(response.getBody());
}
@ -39,7 +40,7 @@ public class RestTemplateUtil {
headerParams.forEach(headers::add);
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("Accept", MediaType.APPLICATION_JSON.toString());
HttpEntity<String> httpEntity = new HttpEntity<>(json, headers);
HttpEntity<String> httpEntity = new HttpEntity(json, headers);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, String.class);
return JSONObject.parseObject(response.getBody());
}

Binary file not shown.

View File

@ -1,5 +1,5 @@
#Generated by Maven
#Tue Jun 18 19:06:20 CST 2024
#Fri Jul 12 19:28:38 CST 2024
version=1.0-SNAPSHOT
groupId=com.bwie
artifactId=etl-common

View File

@ -0,0 +1,20 @@
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\exception\AllException.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\result\Result.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\result\CommonResult.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\util\RestTemplateConfig.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\constants\Constants.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\exception\LimitException.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\result\PageResult.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\constants\TokenConstants.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\util\RequestUtil.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\util\StringUtils.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\enums\ResponseCodeEnum.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\util\RestTemplateUtil.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\constants\JwtConstants.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\util\JwtUtils.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\BaseEntity.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\exception\GlobalException.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\handler\ExceptionHandlers.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\Entity.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\exception\ServiceException.java
D:\workspace\etl-cloud\etl-common\src\main\java\com\etl\common\result\ResultBody.java

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>

View File

@ -0,0 +1,87 @@
<?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"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bwie</groupId>
<artifactId>etl-database</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>etl-database-common</artifactId>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
</properties>
<dependencies>
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
<version>3.5.4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,26 @@
package com.etl.database.common.annoation;
import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@Documented
public @interface Limit {
// 资源key
String key() default "";
// 最多访问次数
double permitsPerSecond();
// 时间
long timeout();
// 时间类型
TimeUnit timeunit() default TimeUnit.MILLISECONDS;
// 提示信息
String msg() default "系统繁忙,请稍后再试";
}

View File

@ -0,0 +1,23 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.etl.database.common.entity.database.BaseMate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
@ApiModel(value = "项目实体类")
@TableName("t_access_item")
public class AccessItem extends BaseMate {
@ApiModelProperty(value = "主键")
private Integer id;
@ApiModelProperty(value = "接入项目名称")
private String accessItemName;
}

View File

@ -0,0 +1,20 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
@ApiModel(value = "分析方式")
@TableName("t_analytic_way")
public class AnalyticWay {
@ApiModelProperty(value = "主键")
private Integer id;
@ApiModelProperty(value = "分析方式名称")
private String analyticWayName;
}

View File

@ -0,0 +1,36 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "规则")
@TableName("t_code")
public class Code {
@ApiModelProperty(value = "规则id")
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "规则名称")
private String codeName;
@ApiModelProperty(value = "规则内容")
private String codeContent;
@ApiModelProperty(value = "规则类型id")
private Integer codeTypeId;
@ApiModelProperty(value = "规则id")
private Integer ruleId;
}

View File

@ -0,0 +1,27 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "规则")
@TableName("t_code_type")
public class CodeType {
@ApiModelProperty(value = "规则id")
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "规则类型名称")
private String codeTypeName;
}

View File

@ -0,0 +1,31 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
/**
*
*/
@ApiModel(description = "数据源类型")
@TableName("t_data_source_type")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DataSourceType{
@TableId(value = "id",type = IdType.AUTO)
@ApiModelProperty(value = "数据源类型id")
private Integer id;
@NotBlank(message = "数据源类型名称不能为空")
@ApiModelProperty(value = "数据源类型名称")
private String dataSourceTypeName;
}

View File

@ -0,0 +1,66 @@
package com.etl.database.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.etl.database.common.entity.database.BaseMate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
/**
*
*/
@ApiModel("数据源配置")
@Data
@TableName("t_data_source_etl")
public class DataSources extends BaseMate {
@TableId(value = "id",type = IdType.AUTO)
@ApiModelProperty(value = "数据源id")
private Integer id;
@ApiModelProperty(value = "数据源描述")
private String databaseDescription;
@NotBlank(message = "连接地址不能为空")
@ApiModelProperty(value = "连接地址")
private String linkAddress;
@NotBlank(message = "端口不能为空")
@ApiModelProperty(value = "端口")
private String port;
@ApiModelProperty(value = "数据库名称")
private String databaseName;
@ApiModelProperty(value = "状态 0-停用 1-启用")
@Min(value = 0, message = "状态值不能小于0")
private Integer status;
@Size(max = 100, message = "备注不能超过100个字符")
@ApiModelProperty(value = "备注")
private String explaina;
@ApiModelProperty(value = "额外配置")
private String extraEvlop;
@ApiModelProperty(value ="数据库类型id")
private Integer databaseType;
@TableField(exist = false)
@ApiModelProperty(value = "数据库类型")
private String dataSourceTypeName;
@ApiModelProperty(value = "用户名")
private String username;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "数据库输入输出状态")
private Integer data;
}

Some files were not shown because too many files have changed in this diff Show More