Compare commits
27 Commits
master
...
jenkins-en
Author | SHA1 | Date | |
---|---|---|---|
![]() |
97ffb19c03 | ||
![]() |
2d4653b29a | ||
![]() |
66bc6a1250 | ||
![]() |
926c1af1e1 | ||
![]() |
f28fe4ecdf | ||
![]() |
56150c156b | ||
![]() |
891a332c59 | ||
![]() |
7cd4396001 | ||
![]() |
62b0caa3da | ||
![]() |
4815b590c4 | ||
![]() |
a238538106 | ||
![]() |
ea35ed1f0b | ||
![]() |
c26a183209 | ||
![]() |
4b8dfe978a | ||
![]() |
30c201a230 | ||
![]() |
818c2e0198 | ||
![]() |
a7398d265c | ||
![]() |
04afb442cf | ||
![]() |
b65bdd95bc | ||
![]() |
790193d0c9 | ||
![]() |
1028cc0705 | ||
![]() |
a7738d2add | ||
![]() |
1d8a1f6eb9 | ||
![]() |
db95a112bc | ||
![]() |
5410bd4374 | ||
![]() |
6642fc493b | ||
![]() |
6e317f9b8c |
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
.idea/**
|
||||
.idea
|
||||
# Log file
|
||||
*.log
|
||||
target
|
||||
@ -27,7 +27,7 @@ replay_pid*
|
||||
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/*
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr!/.flattened-pom.xml
|
||||
@ -41,4 +41,5 @@ target/
|
||||
.vscode/!/.xcodemap/
|
||||
!/.idea/
|
||||
/.idea/
|
||||
/dependencies/.flattened-pom.xml
|
||||
/.idea/
|
||||
/.xcodemap/
|
||||
|
11
.idea/$PROJECT_FILE$
generated
Normal file
11
.idea/$PROJECT_FILE$
generated
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AnalysisProjectProfileManager">
|
||||
<option name="PROJECT_PROFILE" />
|
||||
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||
<list size="0" />
|
||||
</component>
|
||||
<component name="SuppressionsComponent">
|
||||
<option name="suppComments" value="[]" />
|
||||
</component>
|
||||
</project>
|
9
.idea/.gitignore
generated
vendored
Normal file
9
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
../.idea
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
1365
.idea/CopilotChatHistory.xml
generated
Normal file
1365
.idea/CopilotChatHistory.xml
generated
Normal file
File diff suppressed because one or more lines are too long
7
.idea/MarsCodeWorkspaceAppSettings.xml
generated
Normal file
7
.idea/MarsCodeWorkspaceAppSettings.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||
<option name="ckgOperationStatus" value="SUCCESS" />
|
||||
<option name="progress" value="0.99902534" />
|
||||
</component>
|
||||
</project>
|
108
.idea/compiler.xml
generated
Normal file
108
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="machine-management-module" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for ops-pro" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-configuration-processor/3.3.4/spring-boot-configuration-processor-3.3.4.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct-processor/1.6.2/mapstruct-processor-1.6.2.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/mapstruct/mapstruct/1.6.2/mapstruct-1.6.2.jar" />
|
||||
</processorPath>
|
||||
<module name="spring-boot-starter-protection" />
|
||||
<module name="spring-boot-starter-monitor" />
|
||||
<module name="module-system-biz" />
|
||||
<module name="module-ci-process-biz" />
|
||||
<module name="module-system-api" />
|
||||
<module name="spring-boot-starter-mq" />
|
||||
<module name="spring-boot-starter-mongo" />
|
||||
<module name="commons" />
|
||||
<module name="spring-boot-starter-plugin" />
|
||||
<module name="module-ci-engine" />
|
||||
<module name="ops-server" />
|
||||
<module name="spring-boot-starter-biz-data-permission" />
|
||||
<module name="spring-boot-starter-mybatis" />
|
||||
<module name="module-ci-process-api" />
|
||||
<module name="module-infra-api" />
|
||||
<module name="spring-boot-starter-test" />
|
||||
<module name="spring-boot-starter-websocket" />
|
||||
<module name="spring-boot-starter-biz-ip" />
|
||||
<module name="module-infra-biz" />
|
||||
<module name="module-ci-commons" />
|
||||
<module name="spring-boot-starter-job" />
|
||||
<module name="module-ci-store" />
|
||||
<module name="spring-boot-starter-web" />
|
||||
<module name="module-ci-plugin" />
|
||||
<module name="spring-boot-starter-excel" />
|
||||
<module name="spring-boot-starter-biz-tenant" />
|
||||
<module name="spring-boot-starter-redis" />
|
||||
<module name="spring-boot-starter-security" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="module-ci-common-pipeline" target="17" />
|
||||
<module name="module-ci-dispatch-api" target="17" />
|
||||
<module name="module-ci-environment" target="17" />
|
||||
<module name="module-ci-event" target="17" />
|
||||
<module name="module-ci-execute" target="1.5" />
|
||||
<module name="module-ci-log" target="17" />
|
||||
<module name="module-ci-market" target="17" />
|
||||
<module name="module-ci-project" target="17" />
|
||||
<module name="module-ci-quality" target="17" />
|
||||
<module name="module-ci-repository" target="17" />
|
||||
<module name="module-ci-store-api" target="17" />
|
||||
<module name="module-ci-ticket" target="17" />
|
||||
<module name="module-ci-worker" target="17" />
|
||||
<module name="system-plugin-example-web" target="17" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="app-plugins" options="-parameters" />
|
||||
<module name="commons" options="-parameters" />
|
||||
<module name="framework" options="-parameters" />
|
||||
<module name="machine-management-module" options="-parameters" />
|
||||
<module name="module-ci-commons" options="-parameters" />
|
||||
<module name="module-ci-engine" options="-parameters" />
|
||||
<module name="module-ci-plugin" options="-parameters" />
|
||||
<module name="module-ci-process-api" options="-parameters" />
|
||||
<module name="module-ci-process-biz" options="-parameters" />
|
||||
<module name="module-ci-store" options="-parameters" />
|
||||
<module name="module-infra-api" options="-parameters" />
|
||||
<module name="module-infra-biz" options="-parameters" />
|
||||
<module name="module-system-api" options="-parameters" />
|
||||
<module name="module-system-biz" options="-parameters" />
|
||||
<module name="modules" options="-parameters" />
|
||||
<module name="ops-pro" options="-parameters" />
|
||||
<module name="ops-server" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-data-permission" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-ip" options="-parameters" />
|
||||
<module name="spring-boot-starter-biz-tenant" options="-parameters" />
|
||||
<module name="spring-boot-starter-excel" options="-parameters" />
|
||||
<module name="spring-boot-starter-job" options="-parameters" />
|
||||
<module name="spring-boot-starter-mongo" options="-parameters" />
|
||||
<module name="spring-boot-starter-monitor" options="-parameters" />
|
||||
<module name="spring-boot-starter-mq" options="-parameters" />
|
||||
<module name="spring-boot-starter-mybatis" options="-parameters" />
|
||||
<module name="spring-boot-starter-plugin" options="-parameters" />
|
||||
<module name="spring-boot-starter-protection" options="-parameters" />
|
||||
<module name="spring-boot-starter-redis" options="-parameters" />
|
||||
<module name="spring-boot-starter-security" options="-parameters" />
|
||||
<module name="spring-boot-starter-test" options="-parameters" />
|
||||
<module name="spring-boot-starter-web" options="-parameters" />
|
||||
<module name="spring-boot-starter-websocket" options="-parameters" />
|
||||
<module name="system-framework" options="-parameters" />
|
||||
<module name="system-plugin-example-web" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
112
.idea/encodings.xml
generated
Normal file
112
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/app-plugins/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/app-plugins/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/commons/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/commons/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-data-permission/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-data-permission/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-ip/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-ip/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-tenant/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-biz-tenant/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-excel/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-excel/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-job/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-job/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mongo/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mongo/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-monitor/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-monitor/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mq/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mq/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mybatis/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-mybatis/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-plugin/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-plugin/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-protection/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-protection/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-redis/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-redis/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-security/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-security/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-test/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-test/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-web/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-web/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-websocket/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/spring-boot-starter-websocket/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/framework/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/ee/machine-management-module/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-common-pipeline/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-common-pipeline/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/ci-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/pipeline-ci-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/pipline-ci-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-commons/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-dispatch-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-dispatch-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-engine/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-engine/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-environment/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-environment/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-event/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-event/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-log/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-log/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-market/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-market/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-plugin/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-plugin/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/pipeline-ci-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/pipeline-ci-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/pipeline-ci-process-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/pipeline-ci-process-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-process-biz/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-project/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-project/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-quality/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-quality/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-store-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-store-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-store/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-store/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-worker/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-ci-worker/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-infra-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-infra-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-infra-biz/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-infra-biz/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-system-api/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-system-api/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-system-biz/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/module-system-biz/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/modules/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-server/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/ops-server/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="file://$PROJECT_DIR$/system-framework/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/system-framework/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/system-framework/system-plugin-example-web/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/system-framework/system-plugin-example-web/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
32
.idea/gradle.xml
generated
Normal file
32
.idea/gradle.xml
generated
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/modules/ci-commons/pipeline-ci-common" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/pipeline-ci-common" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/modules/pipeline-ci-process/ci-process-api" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/modules/pipeline-ci-process/ci-process-api" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/modules/pipeline-ci-process/ci-process-base" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/modules/pipeline-ci-process/ci-process-base" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
68
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
68
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,68 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliDeprecation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliEqualsAvoidNull" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliMissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliWrapperTypeEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidComplexCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidDoubleOrFloatEqualCompare" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidNegationOperator" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidReturnInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaAvoidUseTimer" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaBigDecimalAvoidDoubleConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaClassMustHaveAuthor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaCountDownShouldInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaMethodReturnWrapperType" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaMethodTooLong" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaPackageNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaPojoMustOverrideToString" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaPojoNoDefaultValue" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaRemoveCommentedCode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaSneakyThrowsWithoutExceptionType" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaStringConcat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaSwitchExpression" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaThreadPoolCreation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaThreadShouldSetName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaUndefineMagicConstant" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
80
.idea/jarRepositories.xml
generated
Normal file
80
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="huaweicloud" />
|
||||
<option name="name" value="huawei" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="aliyunmaven" />
|
||||
<option name="name" value="aliyun" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="aliyunmaven" />
|
||||
<option name="name" value="aliyun" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="huaweicloud" />
|
||||
<option name="name" value="huawei" />
|
||||
<option name="url" value="https://mirrors.huaweicloud.com/repository/maven/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="aliyunmaven" />
|
||||
<option name="name" value="aliyun" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/central" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="huaweicloud" />
|
||||
<option name="name" value="huawei" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/central" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="huaweicloud" />
|
||||
<option name="name" value="huawei" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/central" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
90
.idea/misc.xml
generated
Normal file
90
.idea/misc.xml
generated
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CheckstyleConfigurable">
|
||||
<option name="suppFilterFilename" value="" />
|
||||
<option name="suppCommentFilter" value="false" />
|
||||
<option name="offComment" value="CHECKSTYLE\:OFF" />
|
||||
<option name="onComment" value="CHECKSTYLE\:ON" />
|
||||
<option name="checkFormat" value=".*" />
|
||||
<option name="messageFormat" value="" />
|
||||
<option name="checkCPP" value="true" />
|
||||
<option name="checkC" value="true" />
|
||||
<option name="suppNearbyCommentFilter" value="false" />
|
||||
<option name="snCommentFormat" value="SUPPRESS CHECKSTYLE (\w+)" />
|
||||
<option name="snCheckFormat" value="$1" />
|
||||
<option name="snMessageFormat" value="" />
|
||||
<option name="snInfluenceFormat" value="0" />
|
||||
<option name="snCheckCPP" value="true" />
|
||||
<option name="snCheckC" value="true" />
|
||||
<option name="pathToUserRulesConfiguration" value="" />
|
||||
<option name="pathToJarWithRules" value="" />
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FindBugsConfigurable">
|
||||
<option name="make" value="true" />
|
||||
<option name="effort" value="default" />
|
||||
<option name="priority" value="Medium" />
|
||||
<option name="excludeFilter" value="" />
|
||||
</component>
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$/modules/module-ci-commons/pipeline-ci-common" />
|
||||
<file type="web" url="file://$PROJECT_DIR$/modules/module-ci-process-biz/ci-process-api" />
|
||||
<file type="web" url="file://$PROJECT_DIR$/modules/module-ci-process-biz/ci-process-base" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/pipeline-ci-process/pipeline-ci-process-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-process/pipeline-ci-process-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-worker/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/pipline-ci-common/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/pipeline-ci-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/common-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/common-pipeline/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/common-public/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/common-pipeline/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-environment/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-worker/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-store-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-process-biz/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-process-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ee/machine-management-module/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/pipeline-ci-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/ci-commons/pipline-ci-common/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-common-pipeline/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-common/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-dispatch-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-environment/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-event/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-log/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-market/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-process/pipeline-ci-process-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-project/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-quality/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-repository/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-store-api/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-ticket/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/modules/module-ci-worker/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/system-framework/system-plugin-example-web/pom.xml" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||
<component name="SuppressKotlinCodeStyleNotification">
|
||||
<option name="disableForAll" value="true" />
|
||||
</component>
|
||||
<component name="SuppressionsComponent">
|
||||
<option name="suppComments" value="[]" />
|
||||
</component>
|
||||
</project>
|
1468
.idea/mybatisx/templates.xml
generated
Normal file
1468
.idea/mybatisx/templates.xml
generated
Normal file
File diff suppressed because it is too large
Load Diff
933
.idea/qaplug_profiles.xml
generated
Normal file
933
.idea/qaplug_profiles.xml
generated
Normal file
@ -0,0 +1,933 @@
|
||||
<?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">
|
||||
<coding_rule class="AM_CREATES_EMPTY_JAR_FILE_ENTRY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="AM_CREATES_EMPTY_ZIP_FILE_ENTRY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="AbbreviationAsWordInNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AbstractClassNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AnnotationLocationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AnnotationOnSameLineCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AnnotationUseStyleCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AnonInnerLengthCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ArrayTrailingCommaCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ArrayTypeStyleCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="AtclauseOrderCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AvoidEscapedUnicodeCharactersCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AvoidInlineConditionalsCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="AvoidNestedBlocksCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AvoidNoArgumentSuperConstructorCallCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="AvoidStarImportCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="AvoidStaticImportCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BAC_BAD_APPLET_CONSTRUCTOR" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BC_BAD_CAST_TO_ABSTRACT_COLLECTION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BC_BAD_CAST_TO_CONCRETE_COLLECTION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BC_IMPOSSIBLE_CAST" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BC_IMPOSSIBLE_INSTANCEOF" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BC_UNCONFIRMED_CAST" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="BC_VACUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_ADD_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_AND" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_AND_ZZ" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_IOR" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_IOR_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_SIGNED_CHECK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BIT_SIGNED_CHECK_HIGH_BIT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BOA_BADLY_OVERRIDDEN_ADAPTER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BSHIFT_WRONG_ADD_PRIORITY" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BX_UNBOXING_IMMEDIATELY_REBOXED" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="BestPracticesAbstractClassWithoutAbstractMethod" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesAccessorClassGeneration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesAccessorMethodGeneration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesArrayIsStoredDirectly" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="BestPracticesAvoidPrintStackTrace" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesAvoidReassigningParameters" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesAvoidStringBufferField" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesAvoidUsingHardCodedIP" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesCheckResultSet" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesConstantsInInterface" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesDefaultLabelNotLastInSwitchStmt" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesDontNestJsfInJstlIteration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesForLoopCanBeForeach" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesGuardDebugLogging" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesGuardLogStatement" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesGuardLogStatementJavaUtil" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnit4SuitesShouldUseSuiteAnnotation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnit4TestShouldUseAfterAnnotation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnit4TestShouldUseBeforeAnnotation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnit4TestShouldUseTestAnnotation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnitAssertionsShouldIncludeMessage" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnitTestContainsTooManyAsserts" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnitTestsShouldIncludeAssert" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesJUnitUseExpected" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesLooseCoupling" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesMethodReturnsInternalArray" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="BestPracticesNoClassAttribute" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesNoHtmlComments" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesNoJspForward" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesOneDeclarationPerLine" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesPositionLiteralsFirstInCaseInsensitiveComparisons" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesPositionLiteralsFirstInComparisons" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesPreserveStackTrace" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesReplaceEnumerationWithIterator" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesReplaceHashtableWithMap" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesReplaceVectorWithList" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesSwitchStmtsShouldHaveDefault" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesSystemPrintln" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesUnusedFormalParameter" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesUnusedImports" level="INFO" enabled="false" />
|
||||
<coding_rule class="BestPracticesUnusedLocalVariable" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesUnusedPrivateField" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesUnusedPrivateMethod" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="BestPracticesUseAssertEqualsInsteadOfAssertTrue" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesUseAssertNullInsteadOfAssertTrue" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesUseAssertSameInsteadOfAssertTrue" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesUseAssertTrueInsteadOfAssertEquals" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesUseCollectionIsEmpty" level="MINOR" enabled="false" />
|
||||
<coding_rule class="BestPracticesUseVarargs" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="BooleanExpressionComplexityCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CAA_COVARIANT_ARRAY_ELEMENT_STORE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CAA_COVARIANT_ARRAY_FIELD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CAA_COVARIANT_ARRAY_LOCAL" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CAA_COVARIANT_ARRAY_RETURN" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CD_CIRCULAR_DEPENDENCY" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CI_CONFUSED_INHERITANCE" level="MINOR" enabled="true" />
|
||||
<coding_rule class="CNT_ROUGH_CONSTANT_VALUE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CN_IDIOM" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CN_IDIOM_NO_SUPER_CALL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CO_ABSTRACT_SELF" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CO_COMPARETO_INCORRECT_FLOATING" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CO_COMPARETO_RESULTS_MIN_VALUE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="CO_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CatchParameterNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ClassDataAbstractionCouplingCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ClassFanOutComplexityCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ClassMemberImpliedModifierCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ClassTypeParameterNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAbstractNaming" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAtLeastOneConstructor" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAvoidDollarSigns" level="MINOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleAvoidFinalLocalVariable" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAvoidPrefixingMethodParameters" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAvoidProtectedFieldInFinalClass" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAvoidProtectedMethodInFinalClassNotExtending" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleAvoidUsingNativeCode" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleBooleanGetMethodName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleCallSuperInConstructor" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleClassNamingConventions" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleCommentDefaultAccessModifier" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleConfusingTernary" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleDefaultPackage" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleDontImportJavaLang" level="MINOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleDuplicateImports" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleDuplicateJspImports" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleEmptyMethodInAbstractClassShouldBeAbstract" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleExtendsObject" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleFieldDeclarationsShouldBeAtStartOfClass" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleForLoopShouldBeWhileLoop" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleForLoopsMustUseBraces" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleGenericsNaming" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleIfElseStmtsMustUseBraces" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleIfStmtsMustUseBraces" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleLocalHomeNamingConvention" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleLocalInterfaceSessionNamingConvention" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleLocalVariableCouldBeFinal" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleLongVariable" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleMDBAndSessionBeanNamingConvention" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleMIsLeadingVariableName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleMethodArgumentCouldBeFinal" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleMethodNamingConventions" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleMisleadingVariableName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleNoPackage" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleOnlyOneReturn" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStylePackageCase" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStylePrematureDeclaration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleRemoteInterfaceNamingConvention" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleRemoteSessionInterfaceNamingConvention" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleShortClassName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleShortMethodName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleShortVariable" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleSuspiciousConstantFieldName" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleTooManyStaticImports" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryConstructor" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryFinalModifier" level="INFO" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryFullyQualifiedName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryLocalBeforeReturn" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CodeStyleUnnecessaryModifier" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryParentheses" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUnnecessaryReturn" level="MINOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUselessParentheses" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleUselessQualifiedThis" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleVariableNamingConventions" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CodeStyleWhileLoopsMustUseBraces" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="CommentsIndentationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ConstantNameCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="CovariantEqualsCheck" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="CustomImportOrderCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="CyclomaticComplexityCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DB_DUPLICATE_BRANCHES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DB_DUPLICATE_SWITCH_CLAUSES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DC_DOUBLECHECK" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DC_PARTIALLY_CONSTRUCTED" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DE_MIGHT_DROP" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DE_MIGHT_IGNORE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DLS_DEAD_LOCAL_STORE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DLS_DEAD_LOCAL_STORE_IN_RETURN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DLS_DEAD_LOCAL_STORE_OF_NULL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DLS_DEAD_STORE_OF_CLASS_LITERAL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DLS_OVERWRITTEN_INCREMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DL_SYNCHRONIZATION_ON_BOOLEAN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DL_SYNCHRONIZATION_ON_SHARED_CONSTANT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DMI_ARGUMENTS_WRONG_ORDER" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DMI_BAD_MONTH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DMI_BLOCKING_METHODS_ON_URL" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="DMI_CALLING_NEXT_FROM_HASNEXT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_COLLECTION_OF_URLS" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="DMI_CONSTANT_DB_PASSWORD" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="DMI_DOH" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DMI_EMPTY_DB_PASSWORD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DMI_HARDCODED_ABSOLUTE_FILENAME" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_INVOKING_HASHCODE_ON_ARRAY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ARRAY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_NONSERIALIZABLE_OBJECT_WRITTEN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_RANDOM_USED_ONLY_ONCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DMI_UNSUPPORTED_METHOD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DMI_USELESS_SUBSTRING" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DMI_VACUOUS_SELF_COLLECTION_CALL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DM_BOOLEAN_CTOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_COMPARE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_PARSING" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DM_BOXED_PRIMITIVE_TOSTRING" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_CONVERT_CASE" level="INFO" enabled="true" />
|
||||
<coding_rule class="DM_DEFAULT_ENCODING" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="DM_EXIT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_FP_NUMBER_CTOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_GC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_INVALID_MIN_MAX" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DM_MONITOR_WAIT_ON_CONDITION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_NEW_FOR_GETCLASS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_NEXTINT_VIA_NEXTDOUBLE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_NUMBER_CTOR" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="DM_RUN_FINALIZERS_ON_EXIT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_STRING_CTOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_STRING_TOSTRING" level="INFO" enabled="true" />
|
||||
<coding_rule class="DM_STRING_VOID_CTOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DM_USELESS_THREAD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DP_DO_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DeclarationOrderCheck" level="INFO" enabled="false" />
|
||||
<coding_rule class="DefaultComesLastCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DescendantTokenCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignAbstractClassWithoutAnyMethod" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignAvoidCatchingGenericException" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignAvoidDeeplyNestedIfStmts" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignAvoidRethrowingException" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignAvoidThrowingNewInstanceOfSameException" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignAvoidThrowingNullPointerException" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignAvoidThrowingRawExceptionTypes" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignClassWithOnlyPrivateConstructorsShouldBeFinal" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignCollapsibleIfStatements" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DesignCouplingBetweenObjects" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignCyclomaticComplexity" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignDataClass" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignDoNotExtendJavaLangError" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignExceptionAsFlowControl" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignExcessiveClassLength" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignExcessiveImports" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignExcessiveMethodLength" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignExcessiveParameterList" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignExcessivePublicCount" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignFinalFieldCouldBeStatic" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DesignForExtensionCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DesignGodClass" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignImmutableField" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignLawOfDemeter" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignLogicInversion" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignLoosePackageCoupling" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignModifiedCyclomaticComplexity" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNPathComplexity" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNcssConstructorCount" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNcssCount" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNcssMethodCount" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignNcssTypeCount" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignNoInlineScript" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNoInlineStyleInformation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNoLongScripts" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignNoScriptlets" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignSignatureDeclareThrowsException" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignSimplifiedTernary" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignSimplifyBooleanAssertion" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignSimplifyBooleanExpressions" level="MINOR" enabled="false" />
|
||||
<coding_rule class="DesignSimplifyBooleanReturns" level="MINOR" enabled="false" />
|
||||
<coding_rule class="DesignSimplifyConditional" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DesignSingularField" level="MINOR" enabled="true" />
|
||||
<coding_rule class="DesignStdCyclomaticComplexity" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignSwitchDensity" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignTooManyFields" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignTooManyMethods" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignUseObjectForClearerAPI" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignUseUtilityClass" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DesignUselessOverridingMethod" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="DocumentationCommentContent" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DocumentationCommentRequired" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DocumentationCommentSize" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DocumentationUncommentedEmptyConstructor" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="DocumentationUncommentedEmptyMethodBody" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EC_ARRAY_AND_NONARRAY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_BAD_ARRAY_COMPARE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_INCOMPATIBLE_ARRAY_COMPARE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EC_NULL_ARG" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_UNRELATED_CLASS_AND_INTERFACE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_UNRELATED_INTERFACES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EI_EXPOSE_REP" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EI_EXPOSE_REP2" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EI_EXPOSE_STATIC_REP2" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_ABSTRACT_SELF" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_ALWAYS_FALSE" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="EQ_ALWAYS_TRUE" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_COMPARETO_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EQ_COMPARING_CLASS_NAMES" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_DOESNT_OVERRIDE_EQUALS" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EQ_DONT_DEFINE_EQUALS_FOR_ENUM" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_GETCLASS_AND_CLASS_CONSTANT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="EQ_OTHER_NO_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_OTHER_USE_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_SELF_USE_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EQ_UNUSUAL" level="MINOR" enabled="true" />
|
||||
<coding_rule class="ES_COMPARING_PARAMETER_STRING_WITH_EQ" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ES_COMPARING_STRINGS_WITH_EQ" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ESync_EMPTY_SYNC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="EmptyBlockCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EmptyCatchBlockCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EmptyForInitializerPadCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="EmptyForIteratorPadCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="EmptyLineSeparatorCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="EmptyStatementCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="EqualsAvoidNullCheck" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="EqualsHashCodeCheck" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneAssignmentInOperand" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAssignmentToNonFinalStatic" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidAccessibilityAlteration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidAssertAsIdentifier" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidBranchingStatementAsLastInLoop" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidCallingFinalize" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidCatchingNPE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidCatchingThrowable" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidDecimalLiteralsInBigDecimalConstructor" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidDuplicateLiterals" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidEnumAsIdentifier" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidFieldNameMatchingMethodName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidFieldNameMatchingTypeName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidInstanceofChecksInCatchClause" level="MINOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneAvoidLiteralsInIfCondition" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidLosingExceptionInformation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidMultipleUnaryOperators" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneAvoidUsingOctalValues" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneBadComparison" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneBeanMembersShouldSerialize" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneBrokenNullCheck" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneCallSuperFirst" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneCallSuperLast" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneCheckSkipResult" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneClassCastExceptionWithToArray" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneCloneMethodMustBePublic" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneCloneMethodMustImplementCloneable" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneCloneMethodReturnTypeMustMatchClassName" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneCloneThrowsCloneNotSupportedException" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneCloseResource" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneCompareObjectsWithEquals" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneConstructorCallsOverridableMethod" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneDataflowAnomalyAnalysis" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneDoNotCallGarbageCollectionExplicitly" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneDoNotCallSystemExit" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneDoNotHardCodeSDCard" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneDoNotThrowExceptionInFinally" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneDontImportSun" level="MINOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneDontUseFloatTypeForLoopIndices" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneEmptyCatchBlock" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneEmptyFinalizer" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptyFinallyBlock" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptyIfStmt" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptyInitializer" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneEmptyStatementBlock" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneEmptyStatementNotInLoop" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneEmptyStaticInitializer" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptySwitchStatements" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptySynchronizedBlock" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptyTryBlock" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneEmptyWhileStmt" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneEqualsNull" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneFinalizeDoesNotCallSuperFinalize" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneFinalizeOnlyCallsSuperFinalize" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneFinalizeOverloaded" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneFinalizeShouldBeProtected" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneIdempotentOperations" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneImportFromSamePackage" level="MINOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneInstantiationToGetClass" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneInvalidSlf4jMessageFormat" level="MINOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneJUnitSpelling" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneJUnitStaticSuite" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneJspEncoding" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneJumbledIncrementer" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneLoggerIsNotStaticFinal" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneMethodWithSameNameAsEnclosingClass" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneMisplacedNullCheck" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneMissingBreakInSwitch" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneMissingSerialVersionUID" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneMissingStaticMethodInNonInstantiatableClass" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneMoreThanOneLogger" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneNonCaseLabelInSwitchStatement" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneNonStaticInitializer" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneNullAssignment" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneOverrideBothEqualsAndHashcode" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneProperCloneImplementation" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneProperLogger" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneReturnEmptyArrayRatherThanNull" level="MINOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneReturnFromFinallyBlock" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneSimpleDateFormatNeedsLocale" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneSingleMethodSingleton" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneSingletonClassReturningNewInstance" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneStaticEJBFieldShouldBeFinal" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneStringBufferInstantiationWithChar" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneSuspiciousEqualsMethodName" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneSuspiciousHashcodeMethodName" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneSuspiciousOctalEscape" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneTestClassWithoutTestCases" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneUnconditionalIfStatement" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ErrorProneUnnecessaryBooleanAssertion" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneUnnecessaryCaseChange" level="MINOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneUnnecessaryConversionTemporary" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneUnusedNullCheckInEquals" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneUseCorrectExceptionLogging" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ErrorProneUseEqualsToCompareStrings" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneUseLocaleWithCaseConversions" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ErrorProneUseProperClassLoader" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ErrorProneUselessOperationOnImmutable" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ExecutableStatementCountCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ExplicitInitializationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="FB_MISSING_EXPECTED_WARNING" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="FB_UNEXPECTED_WARNING" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="FE_FLOATING_POINT_EQUALITY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="FI_EMPTY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_EXPLICIT_INVOCATION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_FINALIZER_NULLS_FIELDS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_FINALIZER_ONLY_NULLS_FIELDS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_MISSING_SUPER_CALL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_NULLIFY_SUPER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="FI_PUBLIC_SHOULD_BE_PROTECTED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FI_USELESS" level="MINOR" enabled="true" />
|
||||
<coding_rule class="FL_MATH_USING_FLOAT_PRECISION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="FallThroughCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="FileLengthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="FileTabCharacterCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="FinalClassCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="FinalLocalVariableCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="FinalParametersCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="GC_UNCHECKED_TYPE_IN_GENERIC_CALL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="GC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="GenericWhitespaceCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="HE_EQUALS_NO_HASHCODE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="HE_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HE_HASHCODE_NO_EQUALS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HE_HASHCODE_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HE_INHERITS_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HE_USE_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HRS_REQUEST_PARAMETER_TO_COOKIE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="HSC_HUGE_SHARED_STRING_CONSTANT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="HeaderCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="HiddenFieldCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="HideUtilityClassConstructorCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ICAST_BAD_SHIFT_AMOUNT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ICAST_IDIV_CAST_TO_DOUBLE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ICAST_INTEGER_MULTIPLY_CAST_TO_LONG" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ICAST_INT_2_LONG_AS_INSTANT" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IC_INIT_CIRCULARITY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="IIL_ELEMENTS_GET_LENGTH_IN_LOOP" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP_INDIRECT" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IIL_PREPARE_STATEMENT_IN_LOOP" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IIO_INEFFICIENT_INDEX_OF" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IIO_INEFFICIENT_LAST_INDEX_OF" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IJU_BAD_SUITE_METHOD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IJU_NO_TESTS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IJU_SETUP_NO_SUPER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IJU_SUITE_NOT_STATIC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IJU_TEARDOWN_NO_SUPER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IL_CONTAINER_ADDED_TO_ITSELF" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IL_INFINITE_LOOP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IL_INFINITE_RECURSIVE_LOOP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IMA_INEFFICIENT_MEMBER_ACCESS" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IMSE_DONT_CATCH_IMSE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IM_BAD_CHECK_FOR_ODD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IM_MULTIPLYING_RESULT_OF_IREM" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="INT_BAD_COMPARISON_WITH_INT_VALUE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="INT_BAD_COMPARISON_WITH_SIGNED_BYTE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="INT_BAD_REM_BY_1" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="INT_VACUOUS_BIT_OPERATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="INT_VACUOUS_COMPARISON" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IO_APPENDING_TO_OBJECT_OUTPUT_STREAM" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IS2_INCONSISTENT_SYNC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ISC_INSTANTIATE_STATIC_CLASS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="IS_FIELD_NOT_GUARDED" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ITA_INEFFICIENT_TO_ARRAY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="IT_NO_SUCH_ELEMENT" level="MINOR" enabled="true" />
|
||||
<coding_rule class="IllegalCatchCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IllegalImportCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IllegalInstantiationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IllegalThrowsCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="IllegalTokenCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IllegalTokenTextCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="IllegalTypeCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ImportControlCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ImportOrderCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="IndentationCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="InnerAssignmentCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="InnerTypeLastCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="InterfaceIsTypeCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="InterfaceMemberImpliedModifierCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="InterfaceTypeParameterNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="InvalidJavadocPositionCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS" level="MINOR" enabled="true" />
|
||||
<coding_rule class="JLM_JSR166_LOCK_MONITORENTER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="JLM_JSR166_UTILCONCURRENT_MONITORENTER" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="JavaNCSSCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocBlockTagLocationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocContentLocationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocMethodCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocPackageCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocParagraphCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocStyleCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocTagContinuationIndentationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocTypeCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="JavadocVariableCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="LI_LAZY_INIT_STATIC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="LI_LAZY_INIT_UPDATE_STATIC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="LambdaParameterNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="LeftCurlyCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="LineLengthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="LocalFinalVariableNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="LocalVariableNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ME_ENUM_FIELD_SETTER" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ME_MUTABLE_ENUM_FIELD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MF_CLASS_MASKS_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MF_METHOD_MASKS_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ML_SYNC_ON_UPDATED_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MSF_MUTABLE_SERVLET_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_CANNOT_BE_FINAL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_EXPOSE_REP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="MS_FINAL_PKGPROTECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_MUTABLE_ARRAY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_MUTABLE_COLLECTION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MS_MUTABLE_COLLECTION_PKGPROTECT" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MS_MUTABLE_HASHTABLE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_OOI_PKGPROTECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_PKGPROTECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_SHOULD_BE_FINAL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MS_SHOULD_BE_REFACTORED_TO_BE_FINAL" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="MTIA_SUSPECT_SERVLET_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="MTIA_SUSPECT_STRUTS_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="MWN_MISMATCHED_NOTIFY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="MWN_MISMATCHED_WAIT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="MagicNumberCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="MemberNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MethodCountCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MethodLengthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MethodNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="MethodParamPadCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MethodTypeParameterNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingCtorCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingDeprecatedCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingJavadocMethodCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingJavadocPackageCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingJavadocTypeCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingOverrideCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MissingSwitchDefaultCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ModifiedControlVariableCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ModifierOrderCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="MultipleStringLiteralsCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultipleVariableDeclarationsCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingAvoidSynchronizedAtMethodLevel" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingAvoidThreadGroup" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="MultithreadingAvoidUsingVolatile" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingDoNotUseThreads" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingDontCallThreadRun" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingDoubleCheckedLocking" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingNonThreadSafeSingleton" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingUnsynchronizedStaticDateFormatter" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingUseConcurrentHashMap" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MultithreadingUseNotifyAllInsteadOfNotify" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="MutableExceptionCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_BAD_EQUAL" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_CLASS_NAMING_CONVENTION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_CLASS_NOT_EXCEPTION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_CONFUSING" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_FIELD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_LCASE_HASHCODE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_LCASE_TOSTRING" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_METHOD_CONSTRUCTOR_CONFUSION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_METHOD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_INTERFACE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_VERY_CONFUSING" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_VERY_CONFUSING_INTENTIONAL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_WRONG_PACKAGE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NM_WRONG_PACKAGE_INTENTIONAL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NN_NAKED_NOTIFY" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NOISE_FIELD_REFERENCE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NOISE_METHOD_CALL" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NOISE_NULL_DEREFERENCE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NOISE_OPERATION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NO_NOTIFY_NOT_NOTIFYALL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_ALWAYS_NULL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_ALWAYS_NULL_EXCEPTION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_ARGUMENT_MIGHT_BE_NULL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NP_BOOLEAN_RETURN_NULL" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NP_CLONE_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_CLOSING_NULL" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NP_DEREFERENCE_OF_READLINE_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_GUARANTEED_DEREF" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_IMMEDIATE_DEREFERENCE_OF_READLINE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_LOAD_OF_KNOWN_NULL_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NP_METHOD_RETURN_RELAXING_ANNOTATION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="NP_NONNULL_PARAM_VIOLATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NONNULL_RETURN_VIOLATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_INSTANCEOF" level="BLOCKER" enabled="true" />
|
||||
<coding_rule class="NP_NULL_ON_SOME_PATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_ON_SOME_PATH_EXCEPTION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_PARAM_DEREF" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_NULL_PARAM_DEREF_NONVIRTUAL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_OPTIONAL_RETURN_NULL" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_STORE_INTO_NONNULL_FIELD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_SYNC_AND_NULL_CHECK_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NP_TOSTRING_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NP_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="NPathComplexityCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NS_DANGEROUS_NON_SHORT_CIRCUIT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="NS_NON_SHORT_CIRCUIT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="NeedBracesCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="NestedForDepthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NestedIfDepthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NestedTryDepthCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NewlineAtEndOfFileCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="NoArrayTrailingCommaCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NoCloneCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NoEnumTrailingCommaCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NoFinalizerCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NoLineWrapCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="NoWhitespaceAfterCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="NoWhitespaceBeforeCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="NonEmptyAtclauseDescriptionCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="OBL_UNSATISFIED_OBLIGATION" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="OS_OPEN_STREAM" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="OS_OPEN_STREAM_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="OneStatementPerLineCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="OneTopLevelClassCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="OperatorWrapCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="OrderedPropertiesCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="OuterTypeFilenameCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="OuterTypeNumberCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="OverloadMethodsDeclarationOrderCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PS_PUBLIC_SEMAPHORES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="PT_ABSOLUTE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="PT_RELATIVE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="PZLA_PREFER_ZERO_LENGTH_ARRAYS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="PackageAnnotationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PackageDeclarationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PackageNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ParameterAssignmentCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ParameterNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="ParameterNumberCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ParenPadCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceAddEmptyString" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceAppendCharacterWithChar" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceAvoidArrayLoops" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceAvoidInstantiatingObjectsInLoops" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceAvoidUsingShortType" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceBigIntegerInstantiation" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceBooleanInstantiation" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceByteInstantiation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceConsecutiveAppendsShouldReuse" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceConsecutiveLiteralAppends" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceInefficientEmptyStringCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceInefficientStringBuffering" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceInsufficientStringBufferDeclaration" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceIntegerInstantiation" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceLongInstantiation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceOptimizableToArrayCall" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceRedundantFieldInitializer" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceShortInstantiation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceSimplifyStartsWith" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceStringInstantiation" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceStringToString" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceTooFewBranchesForASwitchStatement" level="MINOR" enabled="false" />
|
||||
<coding_rule class="PerformanceUnnecessaryWrapperObjectCreation" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceUseArrayListInsteadOfVector" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceUseArraysAsList" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceUseIndexOfChar" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="PerformanceUseStringBufferForStringAppends" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="PerformanceUseStringBufferLength" level="MINOR" enabled="true" />
|
||||
<coding_rule class="PerformanceUselessStringValueOf" level="MINOR" enabled="true" />
|
||||
<coding_rule class="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="QF_QUESTIONABLE_FOR_LOOP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RANGE_ARRAY_INDEX" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RANGE_ARRAY_LENGTH" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RANGE_ARRAY_OFFSET" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RANGE_STRING_INDEX" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RC_REF_COMPARISON" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="REC_CATCH_EXCEPTION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RE_POSSIBLE_UNINTENDED_PATTERN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RI_REDUNDANT_INTERFACES" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RR_NOT_CHECKED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RS_READOBJECT_SYNC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RU_INVOKE_RUN" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RV_01_TO_INT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RV_ABSOLUTE_VALUE_OF_HASHCODE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RV_ABSOLUTE_VALUE_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="RV_CHECK_FOR_POSITIVE_INDEXOF" level="MINOR" enabled="true" />
|
||||
<coding_rule class="RV_DONT_JUST_NULL_CHECK_READLINE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RV_EXCEPTION_NOT_THROWN" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RV_NEGATING_RESULT_OF_COMPARETO" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="RV_REM_OF_HASHCODE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RV_REM_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="RV_RETURN_VALUE_IGNORED" level="MINOR" enabled="true" />
|
||||
<coding_rule class="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="RV_RETURN_VALUE_IGNORED_INFERRED" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RedundantImportCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="RedundantModifierCheck" level="MINOR" enabled="true" />
|
||||
<coding_rule class="RegexpCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RegexpHeaderCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RegexpMultilineCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RegexpOnFilenameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RegexpSinglelineCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RegexpSinglelineJavaCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RequireThisCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="ReturnCountCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="RightCurlyCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="RpC_REPEATED_CONDITIONAL_TEST" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SA_FIELD_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_FIELD_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_FIELD_SELF_COMPARISON" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_FIELD_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_LOCAL_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="SA_LOCAL_SELF_COMPARISON" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SA_LOCAL_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SBSC_USE_STRINGBUFFER_CONCATENATION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SC_START_IN_CTOR" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SE_BAD_FIELD" level="MINOR" enabled="false" />
|
||||
<coding_rule class="SE_BAD_FIELD_INNER_CLASS" level="MINOR" enabled="true" />
|
||||
<coding_rule class="SE_BAD_FIELD_STORE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_INNER_CLASS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_METHOD_MUST_BE_PRIVATE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_NONFINAL_SERIALVERSIONID" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SE_NONLONG_SERIALVERSIONID" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_NONSTATIC_SERIALVERSIONID" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_NO_SERIALVERSIONID" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_PRIVATE_READ_RESOLVE_NOT_INHERITED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_READ_RESOLVE_IS_STATIC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_READ_RESOLVE_MUST_RETURN_OBJECT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_TRANSIENT_FIELD_NOT_RESTORED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SF_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SF_SWITCH_NO_DEFAULT" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_ANON" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SIC_THREADLOCAL_DEADLY_EMBRACE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SIO_SUPERFLUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SI_INSTANCE_BEFORE_FINALS_ASSIGNED" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SP_SPIN_ON_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SQL_BAD_PREPARED_STATEMENT_ACCESS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SQL_BAD_RESULTSET_ACCESS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SR_NOT_CHECKED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SS_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="STCAL_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="STI_INTERRUPTED_ON_CURRENTTHREAD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="STI_INTERRUPTED_ON_UNKNOWNTHREAD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SWL_SLEEP_WITH_LOCK_HELD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="SW_SWING_METHODS_INVOKED_IN_SWING_THREAD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SecurityIframeMissingSrcAttribute" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SecurityNoUnsanitizedJSPExpression" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SeparatorWrapCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SimplifyBooleanExpressionCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SimplifyBooleanReturnCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SingleLineJavadocCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SingleSpaceSeparatorCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="StaticVariableNameCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="StringLiteralEqualityCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="SummaryJavadocCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SuperCloneCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SuperFinalizeCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SuppressWarningsCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="SuppressWarningsHolder" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="TLW_TWO_LOCK_WAIT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="ThrowsCountCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="TodoCommentCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="TrailingCommentCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="TranslationCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="TypeNameCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="TypecastParenPadCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UCF_USELESS_CONTROL_FLOW" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UCF_USELESS_CONTROL_FLOW_NEXT_LINE" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UC_USELESS_CONDITION" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UC_USELESS_CONDITION_TYPE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UC_USELESS_OBJECT" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UC_USELESS_OBJECT_STACK" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UC_USELESS_VOID_METHOD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UG_SYNC_SET_UNSYNC_GET" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="UI_INHERITANCE_UNSAFE_GETRESOURCE" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="UL_UNRELEASED_LOCK" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UL_UNRELEASED_LOCK_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UM_UNNECESSARY_MATH" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UPM_UNCALLED_PRIVATE_METHOD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="URF_UNREAD_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="UR_UNINIT_READ" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="USM_USELESS_ABSTRACT_METHOD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="USM_USELESS_SUBCLASS_METHOD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UUF_UNUSED_FIELD" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UWF_NULL_FIELD" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="UWF_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="UW_UNCOND_WAIT" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="UncommentedMainCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UniquePropertiesCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UnnecessaryParenthesesCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="UnnecessarySemicolonAfterTypeMemberDeclarationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UnnecessarySemicolonInEnumerationCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UnnecessarySemicolonInTryWithResourcesCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="UnusedImportsCheck" level="INFO" enabled="true" />
|
||||
<coding_rule class="UpperEllCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="VA_FORMAT_STRING_BAD_ARGUMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_ILLEGAL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_MISSING_ARGUMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VA_FORMAT_STRING_USES_NEWLINE" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="VO_VOLATILE_INCREMENT" level="CRITICAL" enabled="false" />
|
||||
<coding_rule class="VO_VOLATILE_REFERENCE_TO_ARRAY" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="VR_UNRESOLVABLE_REFERENCE" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="VariableDeclarationUsageDistanceCheck" level="MAJOR" enabled="false" />
|
||||
<coding_rule class="VisibilityModifierCheck" level="MAJOR" enabled="true" />
|
||||
<coding_rule class="WA_AWAIT_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="WA_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="WMI_WRONG_MAP_ITERATOR" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="WS_WRITEOBJECT_SYNC" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="WhitespaceAfterCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="WhitespaceAroundCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="WriteTagCheck" level="MINOR" enabled="false" />
|
||||
<coding_rule class="XFB_XML_FACTORY_BYPASS" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="XSS_REQUEST_PARAMETER_TO_JSP_WRITER" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SEND_ERROR" level="CRITICAL" enabled="true" />
|
||||
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER" level="CRITICAL" enabled="true" />
|
||||
</profile>
|
||||
</profiles>
|
||||
<list size="0" />
|
||||
</component>
|
||||
</project>
|
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
593
dependencies/.flattened-pom.xml
vendored
Normal file
593
dependencies/.flattened-pom.xml
vendored
Normal file
@ -0,0 +1,593 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>dependencies</artifactId>
|
||||
<version>2.0.0-jdk17</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>dependencies</name>
|
||||
<description>管理整个项目的依赖版本</description>
|
||||
<properties>
|
||||
<tika-core.version>2.9.2</tika-core.version>
|
||||
<podam.version>8.0.0.RELEASE</podam.version>
|
||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
||||
<opengauss.jdbc.version>5.1.0</opengauss.jdbc.version>
|
||||
<mapstruct.version>1.6.2</mapstruct.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<sqlite.version>3.47.1.0</sqlite.version>
|
||||
<mybatis.version>3.5.16</mybatis.version>
|
||||
<opentracing.version>0.33.0</opentracing.version>
|
||||
<caffeine.version>2.9.3</caffeine.version>
|
||||
<json.version>20250107</json.version>
|
||||
<kingbase.jdbc.version>8.6.0</kingbase.jdbc.version>
|
||||
<commons-compress.version>1.27.1</commons-compress.version>
|
||||
<ip2region.version>2.7.0</ip2region.version>
|
||||
<dynamic-datasource.version>4.3.1</dynamic-datasource.version>
|
||||
<redisson.version>3.36.0</redisson.version>
|
||||
<pf4j-spring.version>0.9.0</pf4j-spring.version>
|
||||
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
|
||||
<dd-plist.version>1.28</dd-plist.version>
|
||||
<spring.boot.version>3.3.4</spring.boot.version>
|
||||
<bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
|
||||
<springdoc.version>2.3.0</springdoc.version>
|
||||
<version-number.version>1.12</version-number.version>
|
||||
<lock4j.version>2.2.7</lock4j.version>
|
||||
<commons-io.version>2.17.0</commons-io.version>
|
||||
<apk-parser.version>2.6.10</apk-parser.version>
|
||||
<ognl.version>3.2.1</ognl.version>
|
||||
<hutool-6.version>6.0.0-M16</hutool-6.version>
|
||||
<resilience4j-circuitbreaker.version>2.3.0</resilience4j-circuitbreaker.version>
|
||||
<jsoup.version>1.18.1</jsoup.version>
|
||||
<mybatis-plus.version>3.5.8</mybatis-plus.version>
|
||||
<knife4j.version>4.5.0</knife4j.version>
|
||||
<lombok.version>1.18.34</lombok.version>
|
||||
<skywalking.version>9.0.0</skywalking.version>
|
||||
<mockito-inline.version>5.2.0</mockito-inline.version>
|
||||
<commons-exec.version>1.4.0</commons-exec.version>
|
||||
<velocity.version>2.4</velocity.version>
|
||||
<reflections.version>0.10.2</reflections.version>
|
||||
<bizlog-sdk.version>3.0.6</bizlog-sdk.version>
|
||||
<anwena.version>2.0.8.3</anwena.version>
|
||||
<pf4j.version>3.12.1</pf4j.version>
|
||||
<logback.version>1.2.13</logback.version>
|
||||
<mybatis-plus-join.version>1.4.13</mybatis-plus-join.version>
|
||||
<hutool-5.version>5.8.32</hutool-5.version>
|
||||
<revision>2.0.0-jdk17</revision>
|
||||
<jsch.version>0.1.55</jsch.version>
|
||||
<winp.version>1.28</winp.version>
|
||||
<postgresql.version>42.7.4</postgresql.version>
|
||||
<spring-boot-admin.version>3.3.3</spring-boot-admin.version>
|
||||
<oracle.version>23.5.0.24.07</oracle.version>
|
||||
<netty.version>4.1.113.Final</netty.version>
|
||||
<oshi-version>6.6.5</oshi-version>
|
||||
<jedis-mock.version>1.1.4</jedis-mock.version>
|
||||
<guava.version>33.3.1-jre</guava.version>
|
||||
<aws-java-sdk-s3.version>1.12.777</aws-java-sdk-s3.version>
|
||||
<commons-net.version>3.11.1</commons-net.version>
|
||||
<jimureport.version>1.7.8</jimureport.version>
|
||||
<easyexcel.verion>4.0.3</easyexcel.verion>
|
||||
<json.schema.validator.veresion>1.5.6</json.schema.validator.veresion>
|
||||
<druid.version>1.2.23</druid.version>
|
||||
<easy-trans.version>3.0.6</easy-trans.version>
|
||||
<dm8.jdbc.version>8.1.3.140</dm8.jdbc.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>${netty.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<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>cd.casic.boot</groupId>
|
||||
<artifactId>commons</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-biz-data-permission</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-biz-ip</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-biz-tenant</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-excel</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-job</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mongo</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-monitor</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mq</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mybatis</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-protection</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-redis</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-infra-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-system-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-commons</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.mouzt</groupId>
|
||||
<artifactId>bizlog-sdk</artifactId>
|
||||
<version>${bizlog-sdk.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
|
||||
<version>${springdoc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||
<version>${dynamic-datasource.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||
<version>${mybatis-plus-join.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<artifactId>easy-trans-spring-boot-starter</artifactId>
|
||||
<version>${easy-trans.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-commons</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<artifactId>easy-trans-mybatis-plus-extend</artifactId>
|
||||
<version>${easy-trans.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fhs-opensource</groupId>
|
||||
<artifactId>easy-trans-anno</artifactId>
|
||||
<version>${easy-trans.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
<version>${redisson.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
||||
<version>${lock4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-toolkit-trace</artifactId>
|
||||
<version>${skywalking.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-toolkit-logback-1.x</artifactId>
|
||||
<version>${skywalking.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-toolkit-opentracing</artifactId>
|
||||
<version>${skywalking.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-api</artifactId>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-util</artifactId>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.opentracing</groupId>
|
||||
<artifactId>opentracing-noop</artifactId>
|
||||
<version>${opentracing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-server-cloud</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-inline</artifactId>
|
||||
<version>${mockito-inline.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.fppt</groupId>
|
||||
<artifactId>jedis-mock</artifactId>
|
||||
<version>${jedis-mock.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>uk.co.jemos.podam</groupId>
|
||||
<artifactId>podam</artifactId>
|
||||
<version>${podam.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool-5.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.hutool</groupId>
|
||||
<artifactId>hutool-extra</artifactId>
|
||||
<version>${hutool-6.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>${easyexcel.verion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>${commons-compress.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-core</artifactId>
|
||||
<version>${tika-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.networknt</groupId>
|
||||
<artifactId>json-schema-validator</artifactId>
|
||||
<version>${json.schema.validator.veresion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>${json.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>transmittable-thread-local</artifactId>
|
||||
<version>${transmittable-thread-local.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>${commons-net.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch</artifactId>
|
||||
<version>${jsch.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
<version>${aws-java-sdk-s3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>${ip2region.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>${jsoup.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>${oshi-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.pf4j</groupId>
|
||||
<artifactId>pf4j</artifactId>
|
||||
<version>${pf4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.pf4j</groupId>
|
||||
<artifactId>pf4j-spring</artifactId>
|
||||
<version>${pf4j-spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.dameng</groupId>
|
||||
<artifactId>DmJdbcDriver18</artifactId>
|
||||
<version>${dm8.jdbc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>${oracle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.opengauss</groupId>
|
||||
<artifactId>opengauss-jdbc</artifactId>
|
||||
<version>${opengauss.jdbc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.com.kingbase</groupId>
|
||||
<artifactId>kingbase8</artifactId>
|
||||
<version>${kingbase.jdbc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>${sqlite.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gitee.anwena</groupId>
|
||||
<artifactId>mongo-plus-boot-starter</artifactId>
|
||||
<version>${anwena.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>${bcprov-jdk18on.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jvnet.winp</groupId>
|
||||
<artifactId>winp</artifactId>
|
||||
<version>${winp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>${reflections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-exec</artifactId>
|
||||
<version>${commons-exec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.plist</groupId>
|
||||
<artifactId>dd-plist</artifactId>
|
||||
<version>${dd-plist.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.dongliu</groupId>
|
||||
<artifactId>apk-parser</artifactId>
|
||||
<version>${apk-parser.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>${caffeine.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-circuitbreaker</artifactId>
|
||||
<version>${resilience4j-circuitbreaker.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ognl</groupId>
|
||||
<artifactId>ognl</artifactId>
|
||||
<version>${ognl.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
113
dependencies/pom.xml
vendored
113
dependencies/pom.xml
vendored
@ -35,8 +35,6 @@
|
||||
<postgresql.version>42.7.4</postgresql.version>
|
||||
<!-- <anwena.version>2.1.0</anwena.version>-->
|
||||
<anwena.version>2.0.8.3</anwena.version>
|
||||
<!-- 消息队列 -->
|
||||
<rocketmq-spring.version>2.3.1</rocketmq-spring.version>
|
||||
<!-- 服务保障相关 -->
|
||||
<lock4j.version>2.2.7</lock4j.version>
|
||||
<!-- 监控相关 -->
|
||||
@ -85,13 +83,9 @@
|
||||
<commons-exec.version>1.4.0</commons-exec.version>
|
||||
<dd-plist.version>1.28</dd-plist.version>
|
||||
<apk-parser.version>2.6.10</apk-parser.version>
|
||||
<logback-core.version>1.5.8</logback-core.version>
|
||||
<logback-classic.version>1.5.8</logback-classic.version>
|
||||
<caffeine.version>2.9.3</caffeine.version>
|
||||
<resilience4j-circuitbreaker.version>2.3.0</resilience4j-circuitbreaker.version>
|
||||
<winrm4j.version>0.12.0</winrm4j.version>
|
||||
<ognl.version>3.4.7</ognl.version>
|
||||
|
||||
<ognl.version>3.2.1</ognl.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@ -159,12 +153,6 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
||||
<version>${rocketmq-spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mybatis</artifactId>
|
||||
@ -220,18 +208,6 @@
|
||||
<artifactId>module-system-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--ci-pipeline-dependency-->
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
@ -241,75 +217,17 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-environment</artifactId>
|
||||
<artifactId>module-ci-process-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-event</artifactId>
|
||||
<artifactId>module-ci-process-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-log</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-market</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-project</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-quality</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-ticket</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-repository</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-worker</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-dispatch-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-store-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>module-ci-execute</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!--ci-pipeline-dependency-->
|
||||
|
||||
<!---->
|
||||
<dependency>
|
||||
@ -657,9 +575,9 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.cloudsoft.windows</groupId>
|
||||
<artifactId>winrm4j</artifactId>
|
||||
<version>${winrm4j.version}</version> <!-- 最新稳定版 -->
|
||||
<groupId>org.pf4j</groupId>
|
||||
<artifactId>pf4j-spring</artifactId>
|
||||
<version>${pf4j-spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--数据库驱动-->
|
||||
@ -726,7 +644,6 @@
|
||||
<version>${reflections.version}</version>
|
||||
<!-- <version>请替换为实际版本号</version>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-exec</artifactId>
|
||||
@ -740,7 +657,6 @@
|
||||
<version>${dd-plist.version}</version>
|
||||
<!-- <version></version>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.dongliu</groupId>
|
||||
<artifactId>apk-parser</artifactId>
|
||||
@ -748,20 +664,6 @@
|
||||
<!-- <version></version>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback-core.version}</version>
|
||||
<!-- <version>1</version>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback-classic.version}</version>
|
||||
<!-- <version></version>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
@ -774,7 +676,6 @@
|
||||
<version>${resilience4j-circuitbreaker.version}</version>
|
||||
</dependency>
|
||||
<!-- devops ci- worker end-->
|
||||
|
||||
<dependency>
|
||||
<groupId>ognl</groupId>
|
||||
<artifactId>ognl</artifactId>
|
||||
|
@ -171,50 +171,8 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
<version>3.5.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.5.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.mouzt</groupId>
|
||||
<artifactId>bizlog-sdk</artifactId>
|
||||
<version>3.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
@ -1,30 +0,0 @@
|
||||
package cd.casic.framework.commons.dataobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName group
|
||||
* @Author hopeli
|
||||
* @Date 2025/5/10 10:20
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class Group {
|
||||
// id
|
||||
private String id;
|
||||
|
||||
// 环境名称
|
||||
private String groupName;
|
||||
|
||||
// 创建时间
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* @pi.model:User
|
||||
* @pi.desc:用户
|
||||
*/
|
||||
private User user;
|
||||
|
||||
// 说明
|
||||
private String detail;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package cd.casic.framework.commons.dataobject;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName PatchUser
|
||||
* @Author hopeli
|
||||
* @Date 2025/5/10 10:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PatchUser {
|
||||
private String userId;
|
||||
private Integer roleType = 0;
|
||||
}
|
@ -41,6 +41,4 @@ public interface GlobalErrorCodeConstants {
|
||||
|
||||
ErrorCode ID_DUPLICATION = new ErrorCode(1000, "ID重复");
|
||||
|
||||
ErrorCode PIPELINE_ERROR = new ErrorCode(1001,"流水线执行错误");
|
||||
|
||||
}
|
||||
|
@ -82,13 +82,6 @@ public class CommonResult<T> implements Serializable {
|
||||
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode());
|
||||
}
|
||||
|
||||
public static <T>CommonResult<T> success() {
|
||||
CommonResult<T> result = new CommonResult<>();
|
||||
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
|
||||
result.msg = "";
|
||||
return result;
|
||||
}
|
||||
|
||||
@JsonIgnore // 避免 jackson 序列化
|
||||
public boolean isSuccess() {
|
||||
return isSuccess(code);
|
||||
|
@ -17,12 +17,6 @@ public final class PageResult<T> implements Serializable {
|
||||
@Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long total;
|
||||
|
||||
@Schema(description = "分页查询页数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long pageNun;
|
||||
|
||||
@Schema(description = "每页条数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long pageSize;
|
||||
|
||||
public PageResult() {
|
||||
}
|
||||
|
||||
@ -31,13 +25,6 @@ public final class PageResult<T> implements Serializable {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public PageResult(List<T> list, Long total , Long pageNun, Long pageSize) {
|
||||
this.list = list;
|
||||
this.total = total;
|
||||
this.pageNun = pageNun;
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public PageResult(Long total) {
|
||||
this.list = new ArrayList<>();
|
||||
this.total = total;
|
||||
|
@ -7,36 +7,15 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.*;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
||||
import static org.springframework.util.FileSystemUtils.deleteRecursively;
|
||||
|
||||
/**
|
||||
* 文件工具类 , 为了匹配插件类,这里补充了yudao里面的工具类
|
||||
* 文件工具类
|
||||
*
|
||||
* @author mianbin
|
||||
*/
|
||||
@Slf4j
|
||||
public class FileUtils {
|
||||
|
||||
/**
|
||||
@ -102,280 +81,4 @@ public class FileUtils {
|
||||
return sha256Hex + '.' + FileTypeUtil.getType(new ByteArrayInputStream(content));
|
||||
}
|
||||
|
||||
|
||||
// 保持原有的 unzip(ZipInputStream zis, Path targetPath) 方法不变
|
||||
public static void unzip(@NonNull ZipInputStream zis, @NonNull Path targetPath)
|
||||
throws IOException {
|
||||
// 1. unzip file to folder
|
||||
// 2. return the folder path
|
||||
Assert.notNull(zis, "Zip input stream must not be null");
|
||||
Assert.notNull(targetPath, "Target path must not be null");
|
||||
|
||||
// Create path if absent
|
||||
createIfAbsent(targetPath);
|
||||
|
||||
// Folder must be empty
|
||||
ensureEmpty(targetPath);
|
||||
|
||||
ZipEntry zipEntry = zis.getNextEntry();
|
||||
|
||||
while (zipEntry != null) {
|
||||
// Resolve the entry path
|
||||
Path entryPath = targetPath.resolve(zipEntry.getName());
|
||||
|
||||
checkDirectoryTraversal(targetPath, entryPath);
|
||||
|
||||
if (Files.notExists(entryPath.getParent())) {
|
||||
Files.createDirectories(entryPath.getParent());
|
||||
}
|
||||
|
||||
if (zipEntry.isDirectory()) {
|
||||
// Create directory
|
||||
Files.createDirectory(entryPath);
|
||||
} else {
|
||||
// Copy file
|
||||
Files.copy(zis, entryPath);
|
||||
}
|
||||
|
||||
zipEntry = zis.getNextEntry();
|
||||
}
|
||||
}
|
||||
|
||||
public static void jar(Path sourcePath, Path targetPath) throws IOException {
|
||||
try (var jos = new JarOutputStream(Files.newOutputStream(targetPath))) {
|
||||
Files.walkFileTree(sourcePath, new SimpleFileVisitor<>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
||||
throws IOException {
|
||||
checkDirectoryTraversal(sourcePath, file);
|
||||
var relativePath = sourcePath.relativize(file);
|
||||
var entry = new JarEntry(relativePath.toString());
|
||||
jos.putNextEntry(entry);
|
||||
Files.copy(file, jos);
|
||||
jos.closeEntry();
|
||||
return super.visitFile(file, attrs);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates directories if absent.
|
||||
*
|
||||
* @param path path must not be null
|
||||
* @throws IOException io exception
|
||||
*/
|
||||
public static void createIfAbsent(@NonNull Path path) throws IOException {
|
||||
Assert.notNull(path, "Path must not be null");
|
||||
|
||||
if (Files.notExists(path)) {
|
||||
// Create directories
|
||||
Files.createDirectories(path);
|
||||
|
||||
log.debug("Created directory: [{}]", path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The given path must be empty.
|
||||
*
|
||||
* @param path path must not be null
|
||||
* @throws IOException io exception
|
||||
*/
|
||||
public static void ensureEmpty(@NonNull Path path) throws IOException {
|
||||
if (!isEmpty(path)) {
|
||||
throw new DirectoryNotEmptyException("Target directory: " + path + " was not empty");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given path is empty.
|
||||
*
|
||||
* @param path path must not be null
|
||||
* @return true if the given path is empty; false otherwise
|
||||
* @throws IOException io exception
|
||||
*/
|
||||
public static boolean isEmpty(@NonNull Path path) throws IOException {
|
||||
Assert.notNull(path, "Path must not be null");
|
||||
|
||||
if (!Files.isDirectory(path) || Files.notExists(path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try (Stream<Path> pathStream = Files.list(path)) {
|
||||
return pathStream.findAny().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
public static void closeQuietly(final Closeable closeable) {
|
||||
closeQuietly(closeable, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the given {@link Closeable} as a null-safe operation while consuming IOException by
|
||||
* the given {@code consumer}.
|
||||
*
|
||||
* @param closeable The resource to close, may be null.
|
||||
* @param consumer Consumes the IOException thrown by {@link Closeable#close()}.
|
||||
*/
|
||||
public static void closeQuietly(final Closeable closeable,
|
||||
final Consumer<IOException> consumer) {
|
||||
if (closeable != null) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException e) {
|
||||
if (consumer != null) {
|
||||
consumer.accept(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks directory traversal vulnerability.
|
||||
*
|
||||
* @param parentPath parent path must not be null.
|
||||
* @param pathToCheck path to check must not be null
|
||||
*/
|
||||
public static void checkDirectoryTraversal(@NonNull Path parentPath,
|
||||
@NonNull Path pathToCheck) {
|
||||
Assert.notNull(parentPath, "Parent path must not be null");
|
||||
Assert.notNull(pathToCheck, "Path to check must not be null");
|
||||
|
||||
if (pathToCheck.normalize().startsWith(parentPath)) {
|
||||
return;
|
||||
}
|
||||
throw new RuntimeException("Directory traversal detected: " + pathToCheck.toString() +
|
||||
"problemDetail.directoryTraversal" + parentPath.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks directory traversal vulnerability.
|
||||
*
|
||||
* @param parentPath parent path must not be null.
|
||||
* @param pathToCheck path to check must not be null
|
||||
*/
|
||||
public static void checkDirectoryTraversal(@NonNull String parentPath,
|
||||
@NonNull String pathToCheck) {
|
||||
checkDirectoryTraversal(Paths.get(parentPath), Paths.get(pathToCheck));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks directory traversal vulnerability.
|
||||
*
|
||||
* @param parentPath parent path must not be null.
|
||||
* @param pathToCheck path to check must not be null
|
||||
*/
|
||||
public static void checkDirectoryTraversal(@NonNull Path parentPath,
|
||||
@NonNull String pathToCheck) {
|
||||
checkDirectoryTraversal(parentPath, Paths.get(pathToCheck));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete folder recursively without exception throwing.
|
||||
*
|
||||
* @param root the root File to delete
|
||||
*/
|
||||
public static void deleteRecursivelyAndSilently(Path root) {
|
||||
try {
|
||||
var deleted = deleteRecursively(root);
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Delete {} result: {}", root, deleted);
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
// Ignore this error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void forceDelete(File file) {
|
||||
if (!FileUtil.exist(file)) {
|
||||
log.debug("文件或目录不存在,无需删除: {}", file);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Path path = file.toPath();
|
||||
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||
Files.delete(file);
|
||||
log.debug("已删除文件: {}", file);
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
|
||||
Files.delete(dir);
|
||||
log.debug("已删除目录: {}", dir);
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
log.info("成功删除文件或目录: {}", file);
|
||||
} catch (IOException e) {
|
||||
log.error("删除文件或目录失败: {}", file, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Boolean deleteFileSilently(Path file) {
|
||||
if (file == null || !Files.isRegularFile(file)) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return Files.deleteIfExists(file);
|
||||
} catch (IOException ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyResource(Resource resource, Path path) {
|
||||
try (var inputStream = resource.getInputStream()) {
|
||||
Files.copy(inputStream, path, REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void copy(Path source, Path dest, CopyOption... options) {
|
||||
try {
|
||||
Files.copy(source, dest, options);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyRecursively(Path src, Path target, Set<String> excludes)
|
||||
throws IOException {
|
||||
var pathMatcher = new AntPathMatcher();
|
||||
Predicate<Path> shouldExclude = path -> excludes.stream()
|
||||
.anyMatch(pattern -> pathMatcher.match(pattern, path.toString()));
|
||||
Files.walkFileTree(src, new SimpleFileVisitor<>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
||||
throws IOException {
|
||||
if (!shouldExclude.test(src.relativize(file))) {
|
||||
Files.copy(file, target.resolve(src.relativize(file)), REPLACE_EXISTING);
|
||||
}
|
||||
return super.visitFile(file, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
|
||||
throws IOException {
|
||||
if (shouldExclude.test(src.relativize(dir))) {
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
Files.createDirectories(target.resolve(src.relativize(dir)));
|
||||
return super.preVisitDirectory(dir, attrs);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static Path createTempDir(String prefix) {
|
||||
try {
|
||||
return Files.createTempDirectory(prefix);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* JSON 工具类 ,经量用hutool的
|
||||
@ -204,44 +202,6 @@ public class JsonUtils extends JSONUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转换为 Map。
|
||||
*
|
||||
* @param obj 要转换的对象
|
||||
* @return 转换后的 Map,如果对象为 null 或转换失败则返回空 Map
|
||||
*/
|
||||
public static Map<String, Object> objectToMap(Object obj) {
|
||||
if (obj == null) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
try {
|
||||
return objectMapper.convertValue(obj, new TypeReference<Map<String, Object>>() {});
|
||||
} catch (IllegalArgumentException e) {
|
||||
log.error("对象转换为 Map 失败", e);
|
||||
return new HashMap<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 Map 转换为指定类型的 Java Bean。
|
||||
*
|
||||
* @param map 要转换的 Map
|
||||
* @param clazz 目标 Java Bean 的 Class 对象
|
||||
* @param <T> 目标 Java Bean 的类型
|
||||
* @return 转换后的 Java Bean,如果 Map 为 null 或转换失败则返回 null
|
||||
*/
|
||||
public static <T> T mapToBean(Map<String, Object> map, Class<T> clazz) {
|
||||
if (map == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return objectMapper.convertValue(map, clazz);
|
||||
} catch (IllegalArgumentException e) {
|
||||
log.error("Map 转换为 Java Bean 失败,目标类型: {}", clazz.getName(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isJson(String text) {
|
||||
return JSONUtil.isTypeJSON(text);
|
||||
}
|
||||
|
@ -1,123 +0,0 @@
|
||||
package cd.casic.framework.commons.util.spring;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.security.CodeSource;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.util.Enumeration;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
|
||||
/**
|
||||
* @description: 供对应用程序主目录的访问
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/25 14:32
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Getter
|
||||
public class SpringBootApplicationHome {
|
||||
private final File source;
|
||||
|
||||
private final File dir;
|
||||
|
||||
public SpringBootApplicationHome() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public SpringBootApplicationHome(Class<?> sourceClass) {
|
||||
this.source = findSource((sourceClass != null) ? sourceClass : getStartClass());
|
||||
this.dir = findHomeDir(this.source);
|
||||
}
|
||||
|
||||
private Class<?> getStartClass() {
|
||||
try {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
return getStartClass(classLoader.getResources("META-INF/MANIFEST.MF"));
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private Class<?> getStartClass(Enumeration<URL> manifestResources) {
|
||||
while (manifestResources.hasMoreElements()) {
|
||||
try (InputStream inputStream = manifestResources.nextElement().openStream()) {
|
||||
Manifest manifest = new Manifest(inputStream);
|
||||
String startClass = manifest.getMainAttributes().getValue("Start-Class");
|
||||
if (startClass != null) {
|
||||
return ClassUtils.forName(startClass, getClass().getClassLoader());
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private File findSource(Class<?> sourceClass) {
|
||||
try {
|
||||
ProtectionDomain domain = (sourceClass != null) ? sourceClass.getProtectionDomain() : null;
|
||||
CodeSource codeSource = (domain != null) ? domain.getCodeSource() : null;
|
||||
URL location = (codeSource != null) ? codeSource.getLocation() : null;
|
||||
File source = (location != null) ? findSource(location) : null;
|
||||
if (source != null && source.exists() && !isUnitTest()) {
|
||||
return source.getAbsoluteFile();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isUnitTest() {
|
||||
try {
|
||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
||||
for (int i = stackTrace.length - 1; i >= 0; i--) {
|
||||
if (stackTrace[i].getClassName().startsWith("org.junit.")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private File findSource(URL location) throws IOException, URISyntaxException {
|
||||
URLConnection connection = location.openConnection();
|
||||
if (connection instanceof JarURLConnection) {
|
||||
return getRootJarFile(((JarURLConnection) connection).getJarFile());
|
||||
}
|
||||
return new File(location.toURI());
|
||||
}
|
||||
|
||||
private File getRootJarFile(JarFile jarFile) {
|
||||
String name = jarFile.getName();
|
||||
int separator = name.indexOf("!/");
|
||||
if (separator > 0) {
|
||||
name = name.substring(0, separator);
|
||||
}
|
||||
return new File(name);
|
||||
}
|
||||
|
||||
private File findHomeDir(File source) {
|
||||
File homeDir = source;
|
||||
homeDir = (homeDir != null) ? homeDir : findDefaultHomeDir();
|
||||
if (homeDir.isFile()) {
|
||||
homeDir = homeDir.getParentFile();
|
||||
}
|
||||
homeDir = homeDir.exists() ? homeDir : new File(".");
|
||||
return homeDir.getAbsoluteFile();
|
||||
}
|
||||
|
||||
private File findDefaultHomeDir() {
|
||||
String userDir = System.getProperty("user.dir");
|
||||
return new File(StringUtils.hasLength(userDir) ? userDir : ".");
|
||||
}
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package collection;
|
||||
|
||||
import cd.casic.framework.commons.util.spring.SpringBootApplicationHome;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @description: 测试jar路径
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/25 14:36
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SpringBootApplicationHomeTests {
|
||||
@Test
|
||||
public void getJarHome() {
|
||||
SpringBootApplicationHome home = new SpringBootApplicationHome();
|
||||
System.out.println(home.getDir());
|
||||
}
|
||||
|
||||
}
|
@ -2,9 +2,8 @@ package cd.casic.framework.datapermission.config;
|
||||
|
||||
import cd.casic.framework.datapermission.core.rule.dept.DeptDataPermissionRule;
|
||||
import cd.casic.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
|
||||
import cd.casic.framework.datapermission.service.PermissionApi;
|
||||
import cd.casic.framework.security.core.LoginUser;
|
||||
|
||||
import cd.casic.module.system.api.permission.PermissionApi;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
|
@ -1,49 +0,0 @@
|
||||
package cd.casic.framework.datapermission.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 多租户配置
|
||||
*
|
||||
* @author mianbin modified from yudao
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "ops.tenant")
|
||||
@Data
|
||||
public class TenantProperties {
|
||||
|
||||
/**
|
||||
* 租户是否开启
|
||||
*/
|
||||
private static final Boolean ENABLE_DEFAULT = true;
|
||||
|
||||
/**
|
||||
* 是否开启
|
||||
*/
|
||||
private Boolean enable = ENABLE_DEFAULT;
|
||||
|
||||
/**
|
||||
* 需要忽略多租户的请求
|
||||
*
|
||||
* 默认情况下,每个请求需要带上 tenant-id 的请求头。但是,部分请求是无需带上的,例如说短信回调、支付回调等 Open API!
|
||||
*/
|
||||
private Set<String> ignoreUrls = Collections.emptySet();
|
||||
|
||||
/**
|
||||
* 需要忽略多租户的表
|
||||
*
|
||||
* 即默认所有表都开启多租户的功能,所以记得添加对应的 tenant_id 字段哟
|
||||
*/
|
||||
private Set<String> ignoreTables = Collections.emptySet();
|
||||
|
||||
/**
|
||||
* 需要忽略多租户的 Spring Cache 缓存
|
||||
*
|
||||
* 即默认所有缓存都开启多租户的功能,所以记得添加对应的 tenant_id 字段哟
|
||||
*/
|
||||
private Set<String> ignoreCaches = Collections.emptySet();
|
||||
|
||||
}
|
@ -4,11 +4,11 @@ import cd.casic.framework.commons.enums.UserTypeEnum;
|
||||
import cd.casic.framework.commons.util.collection.CollectionUtils;
|
||||
import cd.casic.framework.commons.util.json.JsonUtils;
|
||||
import cd.casic.framework.datapermission.core.rule.DataPermissionRule;
|
||||
import cd.casic.framework.commons.dataobject.BaseDO;
|
||||
import cd.casic.framework.datapermission.service.PermissionApi;
|
||||
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cd.casic.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cd.casic.framework.security.core.LoginUser;
|
||||
import cd.casic.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cd.casic.module.system.api.permission.PermissionApi;
|
||||
import cd.casic.module.system.api.permission.dto.DeptDataPermissionRespDTO;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 占位文件,避免文件夹缩进
|
||||
*/
|
||||
package cd.casic.framework.datapermission.operatelog;
|
@ -1,59 +0,0 @@
|
||||
package cd.casic.framework.datapermission.service;
|
||||
|
||||
/**
|
||||
* Security 框架 Service 接口,定义权限相关的校验操作
|
||||
*
|
||||
* @author mianbin modified from yudao
|
||||
*/
|
||||
public interface SecurityFrameworkService {
|
||||
|
||||
/**
|
||||
* 判断是否有权限
|
||||
*
|
||||
* @param permission 权限
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasPermission(String permission);
|
||||
|
||||
/**
|
||||
* 判断是否有权限,任一一个即可
|
||||
*
|
||||
* @param permissions 权限
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasAnyPermissions(String... permissions);
|
||||
|
||||
/**
|
||||
* 判断是否有角色
|
||||
*
|
||||
* 注意,角色使用的是 SysRoleDO 的 code 标识
|
||||
*
|
||||
* @param role 角色
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasRole(String role);
|
||||
|
||||
/**
|
||||
* 判断是否有角色,任一一个即可
|
||||
*
|
||||
* @param roles 角色数组
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasAnyRoles(String... roles);
|
||||
|
||||
/**
|
||||
* 判断是否有授权
|
||||
*
|
||||
* @param scope 授权
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasScope(String scope);
|
||||
|
||||
/**
|
||||
* 判断是否有授权范围,任一一个即可
|
||||
*
|
||||
* @param scope 授权范围数组
|
||||
* @return 是否
|
||||
*/
|
||||
boolean hasAnyScopes(String... scope);
|
||||
}
|
@ -3,10 +3,10 @@ package cd.casic.framework.datapermission.rule.dept;
|
||||
import cd.casic.framework.commons.enums.UserTypeEnum;
|
||||
import cd.casic.framework.commons.util.collection.SetUtils;
|
||||
import cd.casic.framework.datapermission.core.rule.dept.DeptDataPermissionRule;
|
||||
import cd.casic.framework.datapermission.service.PermissionApi;
|
||||
import cd.casic.framework.security.core.LoginUser;
|
||||
import cd.casic.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cd.casic.framework.test.core.ut.BaseMockitoUnitTest;
|
||||
import cd.casic.module.system.api.permission.PermissionApi;
|
||||
import cd.casic.module.system.api.permission.dto.DeptDataPermissionRespDTO;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
@ -21,6 +21,7 @@ import org.mockito.MockedStatic;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static cd.casic.framework.datapermission.core.rule.dept.DeptDataPermissionRule.*;
|
||||
import static cd.casic.framework.test.core.util.RandomUtils.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.framework.commons.util.redis.core;
|
||||
package cd.casic.framework.redis.core;
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.enums.AreaTypeEnum;
|
||||
import cd.casic.framework.redis.core.enums.AreaTypeEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||
import lombok.AllArgsConstructor;
|
@ -1,4 +1,4 @@
|
||||
package cd.casic.framework.commons.util.redis.core.enums;
|
||||
package cd.casic.framework.redis.core.enums;
|
||||
|
||||
import cd.casic.framework.commons.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.commons.util.redis.core.utils;
|
||||
package cd.casic.framework.redis.core.utils;
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.Area;
|
||||
import cd.casic.framework.commons.util.redis.core.enums.AreaTypeEnum;
|
||||
import cd.casic.framework.redis.core.Area;
|
||||
import cd.casic.framework.redis.core.enums.AreaTypeEnum;
|
||||
import cd.casic.framework.commons.util.object.ObjectUtils;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.framework.commons.util.redis.core.utils;
|
||||
package cd.casic.framework.redis.core.utils;
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.Area;
|
||||
import cd.casic.framework.redis.core.Area;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
@ -1,9 +1,9 @@
|
||||
package cd.casic.framework.redis;
|
||||
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.Area;
|
||||
import cd.casic.framework.commons.util.redis.core.enums.AreaTypeEnum;
|
||||
import cd.casic.framework.commons.util.redis.core.utils.AreaUtils;
|
||||
import cd.casic.framework.redis.core.Area;
|
||||
import cd.casic.framework.redis.core.enums.AreaTypeEnum;
|
||||
import cd.casic.framework.redis.core.utils.AreaUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.redis;
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.Area;
|
||||
import cd.casic.framework.commons.util.redis.core.utils.IPUtils;
|
||||
import cd.casic.framework.redis.core.Area;
|
||||
import cd.casic.framework.redis.core.utils.IPUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.lionsoul.ip2region.xdb.Searcher;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-biz-data-permission</artifactId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
@ -71,10 +71,6 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -1,6 +1,5 @@
|
||||
package cd.casic.framework.tenant.config;
|
||||
|
||||
import cd.casic.framework.commons.config.WebProperties;
|
||||
import cd.casic.framework.commons.enums.WebFilterOrderEnum;
|
||||
import cd.casic.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cd.casic.framework.redis.config.OpsCacheProperties;
|
||||
@ -13,7 +12,8 @@ import cd.casic.framework.tenant.core.service.TenantFrameworkServiceImpl;
|
||||
import cd.casic.framework.tenant.core.mq.redis.TenantRedisMessageInterceptor;
|
||||
import cd.casic.framework.tenant.core.service.TenantFrameworkService;
|
||||
import cd.casic.framework.tenant.core.web.TenantContextWebFilter;
|
||||
import cd.casic.framework.datapermission.handler.GlobalExceptionHandler;
|
||||
import cd.casic.framework.web.config.WebProperties;
|
||||
import cd.casic.framework.web.core.handler.GlobalExceptionHandler;
|
||||
import cd.casic.module.system.api.tenant.TenantApi;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
@ -51,7 +51,7 @@ public class OpsTenantAutoConfiguration {
|
||||
|
||||
// ========== DB ==========
|
||||
|
||||
// @Bean
|
||||
@Bean
|
||||
public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties properties,
|
||||
MybatisPlusInterceptor interceptor) {
|
||||
TenantLineInnerInterceptor inner = new TenantLineInnerInterceptor(new TenantDatabaseInterceptor(properties));
|
||||
@ -63,7 +63,7 @@ public class OpsTenantAutoConfiguration {
|
||||
|
||||
// ========== WEB ==========
|
||||
|
||||
// @Bean
|
||||
@Bean
|
||||
public FilterRegistrationBean<TenantContextWebFilter> tenantContextWebFilter() {
|
||||
FilterRegistrationBean<TenantContextWebFilter> registrationBean = new FilterRegistrationBean<>();
|
||||
registrationBean.setFilter(new TenantContextWebFilter());
|
||||
@ -73,7 +73,7 @@ public class OpsTenantAutoConfiguration {
|
||||
|
||||
// ========== Security ==========
|
||||
|
||||
// @Bean
|
||||
@Bean
|
||||
public FilterRegistrationBean<TenantSecurityWebFilter> tenantSecurityWebFilter(TenantProperties tenantProperties,
|
||||
WebProperties webProperties,
|
||||
GlobalExceptionHandler globalExceptionHandler,
|
||||
|
@ -1,80 +0,0 @@
|
||||
package cd.casic.framework.tenant.convert;
|
||||
|
||||
import cd.casic.framework.commons.util.object.BeanUtils;
|
||||
import cd.casic.framework.datapermission.service.auth.vo.AuthLoginRespVO;
|
||||
import cd.casic.framework.datapermission.service.auth.vo.AuthPermissionInfoRespVO;
|
||||
import cd.casic.framework.security.dal.oauth2.OAuth2AccessTokenDO;
|
||||
import cd.casic.framework.security.dal.permission.RoleDO;
|
||||
import cd.casic.framework.security.dal.user.AdminUserDO;
|
||||
import cd.casic.framework.datapermission.core.dal.dataobject.MenuDO;
|
||||
import cd.casic.module.system.enums.permission.MenuTypeEnum;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static cd.casic.framework.commons.util.collection.CollectionUtils.convertSet;
|
||||
import static cd.casic.framework.commons.util.collection.CollectionUtils.filterList;
|
||||
import static cd.casic.framework.datapermission.core.dal.dataobject.MenuDO.ID_ROOT;
|
||||
|
||||
@Mapper
|
||||
public interface AuthConvert {
|
||||
|
||||
AuthConvert INSTANCE = Mappers.getMapper(AuthConvert.class);
|
||||
|
||||
AuthLoginRespVO convert(OAuth2AccessTokenDO bean);
|
||||
|
||||
default AuthPermissionInfoRespVO convert(AdminUserDO user, List<RoleDO> roleList, List<MenuDO> menuList) {
|
||||
return AuthPermissionInfoRespVO.builder()
|
||||
.user(BeanUtils.toBean(user, AuthPermissionInfoRespVO.UserVO.class))
|
||||
.roles(convertSet(roleList, RoleDO::getCode))
|
||||
// 权限标识信息
|
||||
.permissions(convertSet(menuList, MenuDO::getPermission))
|
||||
// 菜单树
|
||||
.menus(buildMenuTree(menuList))
|
||||
.build();
|
||||
}
|
||||
|
||||
AuthPermissionInfoRespVO.MenuVO convertTreeNode(MenuDO menu);
|
||||
|
||||
/**
|
||||
* 将菜单列表,构建成菜单树
|
||||
*
|
||||
* @param menuList 菜单列表
|
||||
* @return 菜单树
|
||||
*/
|
||||
default List<AuthPermissionInfoRespVO.MenuVO> buildMenuTree(List<MenuDO> menuList) {
|
||||
if (CollUtil.isEmpty(menuList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 移除按钮
|
||||
menuList.removeIf(menu -> menu.getType().equals(MenuTypeEnum.BUTTON.getType()));
|
||||
// 排序,保证菜单的有序性
|
||||
menuList.sort(Comparator.comparing(MenuDO::getSort));
|
||||
|
||||
// 构建菜单树
|
||||
// 使用 LinkedHashMap 的原因,是为了排序 。实际也可以用 Stream API ,就是太丑了。
|
||||
Map<Long, AuthPermissionInfoRespVO.MenuVO> treeNodeMap = new LinkedHashMap<>();
|
||||
menuList.forEach(menu -> treeNodeMap.put(menu.getId(), AuthConvert.INSTANCE.convertTreeNode(menu)));
|
||||
// 处理父子关系
|
||||
treeNodeMap.values().stream().filter(node -> !node.getParentId().equals(ID_ROOT)).forEach(childNode -> {
|
||||
// 获得父节点
|
||||
AuthPermissionInfoRespVO.MenuVO parentNode = treeNodeMap.get(childNode.getParentId());
|
||||
if (parentNode == null) {
|
||||
LoggerFactory.getLogger(getClass()).error("[buildRouterTree][resource({}) 找不到父资源({})]",
|
||||
childNode.getId(), childNode.getParentId());
|
||||
return;
|
||||
}
|
||||
// 将自己添加到父节点中
|
||||
if (parentNode.getChildren() == null) {
|
||||
parentNode.setChildren(new ArrayList<>());
|
||||
}
|
||||
parentNode.getChildren().add(childNode);
|
||||
});
|
||||
// 获得到所有的根节点
|
||||
return filterList(treeNodeMap.values(), node -> ID_ROOT.equals(node.getParentId()));
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cd.casic.framework.commons.annotation;
|
||||
package cd.casic.framework.tenant.core.aop;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package cd.casic.framework.tenant.core.aop;
|
||||
|
||||
import cd.casic.framework.commons.annotation.TenantIgnore;
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.commons.util.tenant.TenantUtils;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.util.TenantUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cd.casic.framework.commons.context;
|
||||
package cd.casic.framework.tenant.core.context;
|
||||
|
||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cd.casic.framework.commons.dataobject.tenant;
|
||||
package cd.casic.framework.tenant.core.db;
|
||||
|
||||
|
||||
import cd.casic.framework.commons.dataobject.BaseDO;
|
||||
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.framework.tenant.core.db;
|
||||
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.config.TenantProperties;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||
|
@ -2,7 +2,7 @@ package cd.casic.framework.tenant.core.job;
|
||||
|
||||
import cd.casic.framework.commons.util.json.JsonUtils;
|
||||
import cd.casic.framework.tenant.core.service.TenantFrameworkService;
|
||||
import cd.casic.framework.commons.util.tenant.TenantUtils;
|
||||
import cd.casic.framework.tenant.core.util.TenantUtils;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.exceptions.ExceptionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.framework.tenant.core.mq.kafka;
|
||||
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import org.apache.kafka.clients.producer.ProducerInterceptor;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
@ -10,7 +10,7 @@ import org.springframework.messaging.handler.invocation.InvocableHandlerMethod;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static cd.casic.framework.commons.util.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
import static cd.casic.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
|
||||
/**
|
||||
* Kafka 消息队列的多租户 {@link ProducerInterceptor} 实现类
|
||||
|
@ -1,13 +1,13 @@
|
||||
package cd.casic.framework.tenant.core.mq.rabbitmq;
|
||||
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import org.apache.kafka.clients.producer.ProducerInterceptor;
|
||||
import org.springframework.amqp.AmqpException;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.core.MessagePostProcessor;
|
||||
import org.springframework.messaging.handler.invocation.InvocableHandlerMethod;
|
||||
|
||||
import static cd.casic.framework.commons.util.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
import static cd.casic.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
|
||||
/**
|
||||
* RabbitMQ 消息队列的多租户 {@link ProducerInterceptor} 实现类
|
||||
|
@ -2,10 +2,10 @@ package cd.casic.framework.tenant.core.mq.redis;
|
||||
|
||||
import cd.casic.framework.mq.redis.core.interceptor.RedisMessageInterceptor;
|
||||
import cd.casic.framework.mq.redis.core.message.AbstractRedisMessage;
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import static cd.casic.framework.commons.util.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
import static cd.casic.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
|
||||
/**
|
||||
* 多租户 {@link AbstractRedisMessage} 拦截器
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.tenant.core.redis;
|
||||
|
||||
import cd.casic.framework.redis.core.TimeoutRedisCacheManager;
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cache.Cache;
|
||||
|
@ -1,17 +1,17 @@
|
||||
package cd.casic.framework.tenant.core.security;
|
||||
|
||||
import cd.casic.framework.commons.config.WebProperties;
|
||||
import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants;
|
||||
import cd.casic.framework.commons.pojo.CommonResult;
|
||||
import cd.casic.framework.commons.util.servlet.ServletUtils;
|
||||
import cd.casic.framework.security.core.LoginUser;
|
||||
import cd.casic.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cd.casic.framework.tenant.config.TenantProperties;
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cd.casic.framework.tenant.core.service.TenantFrameworkService;
|
||||
import cd.casic.framework.web.core.filter.ApiRequestFilter;
|
||||
import cd.casic.framework.datapermission.handler.GlobalExceptionHandler;
|
||||
import cd.casic.framework.web.core.handler.GlobalExceptionHandler;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cd.casic.framework.web.config.WebProperties;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
@ -1,66 +0,0 @@
|
||||
package cd.casic.framework.tenant.core.service;
|
||||
|
||||
import cd.casic.framework.datapermission.service.PermissionApi;
|
||||
import cd.casic.framework.security.core.LoginUser;
|
||||
import cd.casic.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static cd.casic.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 默认的 {@link SecurityFrameworkService} 实现类
|
||||
*
|
||||
* @author mianbin modified from yudao
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class SecurityFrameworkServiceImpl implements SecurityFrameworkService {
|
||||
|
||||
private final PermissionApi permissionApi;
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String permission) {
|
||||
return hasAnyPermissions(permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAnyPermissions(String... permissions) {
|
||||
Long userId = getLoginUserId();
|
||||
if (userId == null) {
|
||||
return false;
|
||||
}
|
||||
return permissionApi.hasAnyPermissions(userId, permissions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasRole(String role) {
|
||||
return hasAnyRoles(role);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAnyRoles(String... roles) {
|
||||
Long userId = getLoginUserId();
|
||||
if (userId == null) {
|
||||
return false;
|
||||
}
|
||||
return permissionApi.hasAnyRoles(userId, roles);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasScope(String scope) {
|
||||
return hasAnyScopes(scope);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAnyScopes(String... scope) {
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
if (user == null) {
|
||||
return false;
|
||||
}
|
||||
return CollUtil.containsAny(user.getScopes(), Arrays.asList(scope));
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package cd.casic.framework.commons.util.tenant;
|
||||
package cd.casic.framework.tenant.core.util;
|
||||
|
||||
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.commons.util.util.WebFrameworkUtils;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import static cd.casic.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
|
||||
/**
|
||||
* 多租户 Util
|
||||
@ -87,7 +87,7 @@ public class TenantUtils {
|
||||
*/
|
||||
public static void addTenantHeader(Map<String, String> headers, Long tenantId) {
|
||||
if (tenantId != null) {
|
||||
headers.put(WebFrameworkUtils.HEADER_TENANT_ID, tenantId.toString());
|
||||
headers.put(HEADER_TENANT_ID, tenantId.toString());
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.tenant.core.web;
|
||||
|
||||
import cd.casic.framework.commons.context.TenantContextHolder;
|
||||
import cd.casic.framework.commons.util.util.WebFrameworkUtils;
|
||||
import cd.casic.framework.tenant.core.context.TenantContextHolder;
|
||||
import cd.casic.framework.web.core.util.WebFrameworkUtils;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
@ -47,25 +47,8 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel-core</artifactId>
|
||||
<version>4.0.3</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.excel.excel.core.convert;
|
||||
|
||||
import cd.casic.framework.commons.util.redis.core.Area;
|
||||
import cd.casic.framework.commons.util.redis.core.utils.AreaUtils;
|
||||
import cd.casic.framework.redis.core.Area;
|
||||
import cd.casic.framework.redis.core.utils.AreaUtils;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cd.casic.framework.commons.dataobject;
|
||||
package cd.casic.framework.mybatis.core.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -52,7 +52,7 @@ public abstract class BaseDO implements Serializable, TransPojo {
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
// @TableLogic
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package cd.casic.framework.mybatis.core.handler;
|
||||
|
||||
import cd.casic.framework.commons.dataobject.BaseDO;
|
||||
import cd.casic.framework.commons.util.util.WebFrameworkUtils;
|
||||
import cd.casic.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cd.casic.framework.web.core.util.WebFrameworkUtils;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
|
@ -19,16 +19,6 @@
|
||||
<artifactId>commons</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cd.casic.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
@ -75,7 +65,6 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -1,18 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.function.PluginGetter;
|
||||
import org.pf4j.Plugin;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/20 15:11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DefaultPluginGetter implements PluginGetter {
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin(String name) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.pf4j.DefaultPluginDescriptor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/19 17:32
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OpsPluginDescriptor extends DefaultPluginDescriptor {
|
||||
|
||||
private final String configFileName;
|
||||
private final List<String> configFileActive;
|
||||
|
||||
public OpsPluginDescriptor(String pluginId, String pluginDescription, String pluginClass,
|
||||
String version, String requires, String provider, String license,
|
||||
String configFileName, List<String> configFileActive) {
|
||||
super(pluginId, pluginDescription, pluginClass, version, requires, provider, license);
|
||||
this.configFileActive = configFileActive;
|
||||
this.configFileName = configFileName;
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package cd.casic.plugin.constants;
|
||||
package cd.casic.plugin;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
/**
|
||||
@ -9,27 +8,8 @@ import lombok.experimental.UtilityClass;
|
||||
* @Date 2025/5/8 14:51
|
||||
* @Created by mianbin
|
||||
*/
|
||||
@Data
|
||||
@UtilityClass
|
||||
public class PluginConstants {
|
||||
|
||||
/**
|
||||
* 插件静态资源目录
|
||||
*/
|
||||
public static final String PLUGINS_RESOURCES_DIR = "ops-module-plugins/ops-module-plugins-example-web/src/main/resources/static";
|
||||
/**
|
||||
* 角色:管理员
|
||||
*/
|
||||
public static final String ROLE_ADMIN = "admin";
|
||||
/**
|
||||
* 角色:用户
|
||||
*/
|
||||
public static final String ROLE_USER = "user";
|
||||
/**
|
||||
* 角色:编辑
|
||||
*/
|
||||
public static final String ROLE_EDITOR = "editor";
|
||||
|
||||
/**
|
||||
* Plugin metadata labels key.
|
||||
*/
|
||||
@ -48,14 +28,4 @@ public class PluginConstants {
|
||||
String assetsRoutePrefix(String pluginName) {
|
||||
return "/plugins/" + pluginName + "/assets/";
|
||||
}
|
||||
|
||||
|
||||
public static class Suffix {
|
||||
|
||||
private Suffix() { throw new IllegalStateException();
|
||||
}
|
||||
|
||||
public static final String JAR = "jar";
|
||||
public static final String ZIP = "zip";
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package cd.casic.plugin.function;
|
||||
package cd.casic.plugin;
|
||||
|
||||
import org.pf4j.Plugin;
|
||||
import cd.casic.plugin.extension.Plugin;
|
||||
|
||||
/**
|
||||
* @Classname PluginGetter
|
@ -0,0 +1,46 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.extension.Plugin;
|
||||
import org.pf4j.PluginWrapper;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* @Classname PluginService
|
||||
* @Description 插件服务类
|
||||
* @Date 2025/5/8 19:58
|
||||
* @Created by mianbin
|
||||
*/
|
||||
public interface PluginService {
|
||||
|
||||
boolean installPresetPlugins();
|
||||
|
||||
Plugin install(Path path);
|
||||
|
||||
Plugin upgrade(String name, Path path);
|
||||
|
||||
/**
|
||||
* 重新加载插件,插件spec.enabled 设置为 true
|
||||
*/
|
||||
Mono<Plugin> reload(String name);
|
||||
|
||||
DataBuffer uglifyJsBundle();
|
||||
|
||||
DataBuffer uglifyCssBundle();
|
||||
|
||||
String generateBundleVersion();
|
||||
|
||||
Resource getJsBundle(String version);
|
||||
|
||||
Resource getCssBundle(String version);
|
||||
|
||||
Plugin changeState(String pluginName, boolean requestToEnable, boolean wait);
|
||||
|
||||
List<String> getRequiredDependencies(Plugin plugin,
|
||||
Predicate<PluginWrapper> predicate);
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.framework.commons.util.io.FileUtils;
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.dataobject.dao.PluginFacadeMemoryCache;
|
||||
import cd.casic.plugin.dataobject.dto.PluginInformation;
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.exception.PluginInstallationException;
|
||||
import cd.casic.plugin.function.IPluginManager;
|
||||
import cd.casic.plugin.function.PluginLifecycle;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.pf4j.DefaultPluginManager;
|
||||
import org.pf4j.PluginState;
|
||||
import org.pf4j.PluginWrapper;
|
||||
import org.pf4j.RuntimeMode;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class PluginServiceImpl extends DefaultPluginManager implements
|
||||
IPluginManager,
|
||||
PluginLifecycle,
|
||||
InitializingBean,
|
||||
DisposableBean {
|
||||
|
||||
public PluginServiceImpl(PluginProperties pluginProperties) {
|
||||
this.pluginsRoots.add(Paths.get(pluginProperties.getPluginRoot()));
|
||||
this.setRuntimeMode(pluginProperties.getRuntimeMode());
|
||||
super.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
// 这里不需要任何操作,只是覆盖父类的initialize方法
|
||||
// 如果不重写的话,在调用构造函数的时候会调用父类的无参构造函数,导致父类initialize方法被调用。
|
||||
// 父类initialize方法中会调用createPluginStatusProvider方法,该方法需要使用到PluginProperties,而此时还未被注入
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginInfo install(Path path) throws Exception {
|
||||
/* 插件的目录
|
||||
工作目录
|
||||
│
|
||||
├─plugins
|
||||
│ ├─example-mybatis-plugin@0.1 插件目录,id@version,存放jar、database、resource
|
||||
│ │ ├─ops-module-plugin-example-mybatis-plugin.jar 插件jar包,jar包命名不影响
|
||||
│ │ ├─database 存放sqlite数据库文件
|
||||
│ │ └─resource 存放静态资源
|
||||
│ └─example-redis-plugin@1.1.4
|
||||
│ ├─ops-module-plugin-example-redis-plugin.jar
|
||||
│ ├─database
|
||||
│ └─resource
|
||||
*/
|
||||
String pluginId = StringUtils.EMPTY;
|
||||
try {
|
||||
beforeWork();
|
||||
pluginId = loadPlugin(path);
|
||||
PluginState pluginState = startPlugin(pluginId);
|
||||
log.info("install plugin [{}] success , plugin state {}", pluginId, pluginState.name());
|
||||
return PluginFacadeMemoryCache.getPluginInfo(pluginId);
|
||||
} catch (Exception e) {
|
||||
log.error("安装插件出现异常:{}", e.getMessage());
|
||||
Optional.of(pluginId).ifPresent(PluginFacadeMemoryCache::removePlugin);
|
||||
throw new PluginInstallationException(e.getMessage(), e.getLocalizedMessage(), e.getStackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void installAfter(String pluginId) {
|
||||
try {
|
||||
super.stopPlugin(pluginId);
|
||||
} catch (Exception e) {
|
||||
log.error("install plugin after error:{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unInstall(String pluginId, boolean isUpdate) throws Exception {
|
||||
// TODO unInstall的时候除掉插件资源
|
||||
log.info("unInstallPlugin:" + pluginId);
|
||||
PluginState pluginState = stopPlugin(pluginId);
|
||||
if (pluginState != PluginState.STOPPED) {
|
||||
throw new UnexpectedPluginStateException();
|
||||
}
|
||||
PluginInfo plugin = PluginFacadeMemoryCache.getPluginInfo(pluginId);
|
||||
plugin.clearApplicationContext();
|
||||
PluginFacadeMemoryCache.removePlugin(pluginId);
|
||||
//删除插件
|
||||
FileUtils.forceDelete(plugin.getPluginWrapper().getPluginPath().toFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initPlugins(List<PluginInformation> plugins) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginWrapper> getInstallPlugins() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginInfo upgrade(String name, Path path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginInfo reload(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataBuffer uglifyJsBundle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataBuffer uglifyCssBundle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateBundleVersion() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource getJsBundle(String version) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resource getCssBundle(String version) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginInfo changeState(String pluginName, boolean requestToEnable, boolean wait) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeWork() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void AfterWork() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static class UnexpectedPluginStateException extends RuntimeException {
|
||||
}
|
||||
|
||||
public void setRuntimeMode(RuntimeMode runtimeMode) {
|
||||
this.runtimeMode = runtimeMode;
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.function.PluginsRootGetter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/13 10:53
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class PluginsRootGetterImpl implements PluginsRootGetter {
|
||||
|
||||
private final PluginProperties properties;
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public String get() {
|
||||
return properties.getPluginRoot();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
/**
|
||||
* @Classname SpringPlugin
|
||||
* @Description TODO
|
||||
* @Date 2025/5/8 14:48
|
||||
* @Created by mianbin
|
||||
*/
|
||||
public class SpringPlugin {
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.core.PluginContext;
|
||||
import cd.casic.plugin.dataobject.pojo.SpringPlugin;
|
||||
import cd.casic.plugin.function.PluginGetter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.pf4j.Plugin;
|
||||
import org.pf4j.PluginFactory;
|
||||
import org.pf4j.PluginWrapper;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 15:16
|
||||
* @version: 1.0
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class SpringPluginFactory implements PluginFactory {
|
||||
|
||||
private final PluginApplicationContextFactory contextFactory;
|
||||
private final PluginGetter pluginGetter;
|
||||
|
||||
@Override
|
||||
public Plugin create(PluginWrapper pluginWrapper) {
|
||||
var plugin = pluginGetter.getPlugin(pluginWrapper.getPluginId());
|
||||
var pluginContext = PluginContext.builder()
|
||||
.name(pluginWrapper.getPluginId())
|
||||
.configMapName(plugin.getClass().getName())
|
||||
.version(pluginWrapper.getDescriptor().getVersion())
|
||||
.runtimeMode(pluginWrapper.getRuntimeMode())
|
||||
.build();
|
||||
return new SpringPlugin(contextFactory, pluginContext);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cd.casic.plugin.utils;
|
||||
package cd.casic.plugin;
|
||||
|
||||
import com.github.zafarkhaja.semver.Version;
|
||||
import lombok.experimental.UtilityClass;
|
@ -1,42 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.dataobject.dao.PluginFacadeMemoryCache;
|
||||
import cd.casic.plugin.dataobject.dto.PluginSpecStorage;
|
||||
import cd.casic.plugin.utils.PluginDescriptorUtils;
|
||||
import org.pf4j.PluginDescriptor;
|
||||
import org.pf4j.PluginDescriptorFinder;
|
||||
import org.pf4j.util.FileUtils;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* @description: 优化代码
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 19:19
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class YamlPluginDescriptorFinder implements PluginDescriptorFinder {
|
||||
|
||||
private final YamlPluginFinder yamlPluginFinder;
|
||||
|
||||
public YamlPluginDescriptorFinder() {
|
||||
yamlPluginFinder = new YamlPluginFinder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Path pluginPath) {
|
||||
return Files.exists(pluginPath)
|
||||
&& (Files.isDirectory(pluginPath) || FileUtils.isJarFile(pluginPath));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginDescriptor find(Path pluginPath) {
|
||||
PluginSpecStorage pluginSpecStorage = yamlPluginFinder.find(pluginPath);
|
||||
try {
|
||||
return PluginDescriptorUtils.storageOpsPluginDescriptor(pluginSpecStorage);
|
||||
} finally {
|
||||
PluginFacadeMemoryCache.putPluginSpec(pluginSpecStorage.getPluginId(), pluginSpecStorage);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package cd.casic.plugin;
|
||||
|
||||
import cd.casic.plugin.dataobject.dto.PluginSpecStorage;
|
||||
import cd.casic.plugin.utils.YamlUnstructuredLoader;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.DevelopmentPluginClasspath;
|
||||
import org.pf4j.PluginRuntimeException;
|
||||
import org.pf4j.util.FileUtils;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 19:20
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
public class YamlPluginFinder {
|
||||
static final DevelopmentPluginClasspath PLUGIN_CLASSPATH = new DevelopmentPluginClasspath();
|
||||
public static final String DEFAULT_PROPERTIES_FILE_NAME = "plugin.yaml";
|
||||
private final String propertiesFileName;
|
||||
|
||||
public YamlPluginFinder() {
|
||||
this(DEFAULT_PROPERTIES_FILE_NAME);
|
||||
}
|
||||
|
||||
public YamlPluginFinder(String propertiesFileName) {
|
||||
this.propertiesFileName = propertiesFileName;
|
||||
}
|
||||
|
||||
public PluginSpecStorage find(Path pluginPath) {
|
||||
PluginSpecStorage pluginSpecStorage = readPluginDescriptor(pluginPath);
|
||||
Optional.of(pluginSpecStorage.getEnable()).ifPresent(t -> {
|
||||
pluginSpecStorage.setEnable(PluginSpecStorage.StatusPhase.PENDING);
|
||||
});
|
||||
Optional.of(pluginSpecStorage.getPluginDirPath()).ifPresent(pluginSpecStorage::setPluginDirPath);
|
||||
return pluginSpecStorage;
|
||||
}
|
||||
|
||||
private PluginSpecStorage readPluginDescriptor(Path pluginPath) {
|
||||
Path propertiesPath = null;
|
||||
try {
|
||||
propertiesPath = getManifestPath(pluginPath, propertiesFileName);
|
||||
if (propertiesPath == null) {
|
||||
throw new PluginRuntimeException("找不到插件 manifest path");
|
||||
}
|
||||
log.debug("debug下插件的配置文件内容 plugin descriptor in '{}'", propertiesPath);
|
||||
if (Files.notExists(propertiesPath)) {
|
||||
throw new PluginRuntimeException("Cannot find '{}' path", propertiesPath);
|
||||
}
|
||||
Resource yamlResource = new FileSystemResource(propertiesPath);
|
||||
YamlUnstructuredLoader yamlUnstructuredLoader = new YamlUnstructuredLoader(yamlResource);
|
||||
return yamlUnstructuredLoader.load();
|
||||
} finally {
|
||||
FileUtils.closePath(propertiesPath);
|
||||
}
|
||||
}
|
||||
|
||||
private Path getManifestPath(Path pluginPath, String propertiesFileName) {
|
||||
if (Files.isDirectory(pluginPath)) {
|
||||
for (String location : PLUGIN_CLASSPATH.getClassesDirectories()) {
|
||||
var path = pluginPath.resolve(location).resolve(propertiesFileName);
|
||||
Resource propertyResource = new FileSystemResource(path);
|
||||
if (propertyResource.exists()) {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
throw new PluginRuntimeException(
|
||||
"找不到插件配置目录: " + DEFAULT_PROPERTIES_FILE_NAME);
|
||||
} else {
|
||||
try {
|
||||
return FileUtils.getPath(pluginPath, propertiesFileName);
|
||||
} catch (IOException e) {
|
||||
throw new PluginRuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package cd.casic.plugin.annotation;
|
||||
|
||||
import cd.casic.plugin.constants.PluginConstants;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author:mianbin
|
||||
* @Package:cd.casic.plugin.annotation
|
||||
* @Project:ops
|
||||
* @name:AdminGroup
|
||||
* @Date:2024/03/18 17:06
|
||||
* @Filename:AdminGroup
|
||||
* @description:自定义菜单Group注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@Documented
|
||||
public @interface AdminGroup {
|
||||
/** 菜单名称 */
|
||||
String name();
|
||||
|
||||
/** 菜单组id */
|
||||
String groupId();
|
||||
|
||||
/** 菜单图标 */
|
||||
String icon() default "fa-circle-o";
|
||||
|
||||
/** 菜单url */
|
||||
String url() default "";
|
||||
|
||||
/** 菜单角色 */
|
||||
String[] role() default {PluginConstants.ROLE_ADMIN};
|
||||
|
||||
/** 菜单序号 */
|
||||
int seq() default 99;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package cd.casic.plugin.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author:mianbin
|
||||
* @Package:cd.casic.plugin.annotation
|
||||
* @Project:ops
|
||||
* @name:AdminGroups
|
||||
* @Date:2024/03/18 17:05
|
||||
* @Filename:AdminGroups
|
||||
* @description:自定义菜单groups注解
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
@Documented
|
||||
public @interface AdminGroups {
|
||||
/** 菜单组 */
|
||||
AdminGroup[] groups();
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cd.casic.plugin.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @Classname BaseInformation
|
||||
* @Description 扩展的元数据
|
||||
* @Date 2025/5/8 15:07
|
||||
* @Created by mianbin
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface BasePluginInformation {
|
||||
|
||||
String group();
|
||||
|
||||
String version();
|
||||
|
||||
String kind();
|
||||
|
||||
String plural();
|
||||
|
||||
String singular();
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package cd.casic.plugin.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author:mianbin
|
||||
* @Package:cd.casic.plugin.annotation
|
||||
* @Project:ops
|
||||
* @name:InterceptPath
|
||||
* @Date:2024/03/18 16:09
|
||||
* @Filename:InterceptPath
|
||||
* @description:插件拦截器
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
public @interface InterceptPath {
|
||||
/**
|
||||
* 拦截的路径
|
||||
*/
|
||||
String[] value();
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package cd.casic.plugin.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 用于标记插件内部的独立配置类
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface PluginConfiguration {
|
||||
String fileName() default ""; // 插件配置文件的文件名
|
||||
|
||||
String deploySuffix() default ""; // 插件配置文件在deployment模式下的后缀
|
||||
|
||||
String devSuffix() default ""; // 插件配置文件在development模式下的后缀
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
package cd.casic.plugin.config;
|
||||
|
||||
import cd.casic.plugin.utils.PathUtils;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import lombok.Data;
|
||||
import org.pf4j.RuntimeMode;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 插件Properties
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 16:06
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EnableConfigurationProperties(PluginProperties.class)
|
||||
@ConfigurationProperties(prefix = "ops.plugin")
|
||||
public class PluginProperties implements InitializingBean {
|
||||
|
||||
public static final String GRADLE_LIBS_DIR = "build/libs";
|
||||
|
||||
/**
|
||||
* Auto start plugin when main app is ready.
|
||||
*/
|
||||
private boolean enable = true;
|
||||
|
||||
/**
|
||||
* 默认插件路径是通过文件扫描获取的。在开发模式下,你可以指定插件路径作为项目目录。
|
||||
*/
|
||||
private String pluginRoot;
|
||||
|
||||
/**
|
||||
* 默认情况下禁用的插件.
|
||||
*/
|
||||
private String[] disabledPlugins = new String[0];
|
||||
|
||||
/**
|
||||
* 默认情况需要启动的插件,要在`disabledPlugins`之前.
|
||||
*/
|
||||
private String[] enabledPlugins = new String[0];
|
||||
|
||||
/**
|
||||
* 插件的类目录
|
||||
*/
|
||||
private List<String> classesDirectories = new ArrayList<>();
|
||||
/**
|
||||
* 插件接口统一前缀
|
||||
*/
|
||||
private String restPathPrefix;
|
||||
/**
|
||||
* 插件restful接口前缀中是否需要包含插件id,默认包含
|
||||
*/
|
||||
private boolean enablePluginIdAsRestPrefix = true;
|
||||
/**
|
||||
* 插件jar目录.
|
||||
*/
|
||||
private List<String> libDirectories = new ArrayList<>(List.of(GRADLE_LIBS_DIR));
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
private RuntimeMode runtimeMode = RuntimeMode.DEPLOYMENT;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Path pluginsRootPath = Paths.get(pluginRoot);
|
||||
if (!PathUtils.exists(pluginsRootPath, false)) {
|
||||
FileUtil.mkdir(pluginsRootPath.toFile());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.Plugin;
|
||||
import org.pf4j.PluginWrapper;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 20:38
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Slf4j
|
||||
@AllArgsConstructor(access = AccessLevel.PUBLIC)
|
||||
public class BasePlugin extends Plugin {
|
||||
|
||||
protected PluginContext context;
|
||||
|
||||
@Deprecated(since = "1.0.0", forRemoval = true)
|
||||
public BasePlugin(PluginWrapper wrapper) {
|
||||
super(wrapper);
|
||||
log.warn("官方说废弃 Deprecated constructor 'BasePlugin(PluginWrapper wrapper)' called, please use "
|
||||
+ "'BasePlugin(PluginContext pluginContext)' instead for plugin '{}',This "
|
||||
+ "constructor will be removed in 2.19.0",
|
||||
wrapper.getPluginId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据插件主类获取插件包
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String scanPackage() {
|
||||
return this.getClass().getPackage().getName();
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import org.pf4j.DevelopmentPluginRepository;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 设置一个固定的插件路径
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/13 10:47
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DefaultDevelopmentPluginRepository extends DevelopmentPluginRepository {
|
||||
private final List<Path> fixedPaths = new ArrayList<>();
|
||||
|
||||
public DefaultDevelopmentPluginRepository(Path... pluginsRoots) {
|
||||
super(pluginsRoots);
|
||||
}
|
||||
|
||||
public DefaultDevelopmentPluginRepository(List<Path> pluginsRoots) {
|
||||
super(pluginsRoots);
|
||||
}
|
||||
|
||||
public void setFixedPaths(List<Path> paths) {
|
||||
if (CollectionUtils.isEmpty(paths)) {
|
||||
return;
|
||||
}
|
||||
fixedPaths.clear();
|
||||
fixedPaths.addAll(paths);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Path> getPluginPaths() {
|
||||
List<Path> paths = new ArrayList<>(fixedPaths);
|
||||
paths.addAll(super.getPluginPaths());
|
||||
return paths;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletePluginPath(Path pluginPath) {
|
||||
return fixedPaths.remove(pluginPath);
|
||||
}
|
||||
}
|
||||
|
@ -1,231 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import cd.casic.plugin.PluginApplicationContextFactory;
|
||||
import cd.casic.plugin.PluginRouterFunctionRegistry;
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.dataobject.pojo.SpringPlugin;
|
||||
import cd.casic.plugin.event.*;
|
||||
import cd.casic.plugin.function.FinderRegistry;
|
||||
import cd.casic.plugin.function.WebSocketEndpointManager;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.env.PropertySourceLoader;
|
||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextClosedEvent;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.servlet.function.RouterFunction;
|
||||
import org.springframework.web.servlet.function.ServerResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 23:48
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class DefaultPluginApplicationContextFactory implements PluginApplicationContextFactory {
|
||||
|
||||
private final SpringPluginManager pluginManager;
|
||||
|
||||
@Override
|
||||
public ApplicationContext create(String pluginId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static class FinderManager {
|
||||
|
||||
private final String pluginId;
|
||||
|
||||
private final FinderRegistry finderRegistry;
|
||||
|
||||
private FinderManager(String pluginId, FinderRegistry finderRegistry) {
|
||||
this.pluginId = pluginId;
|
||||
this.finderRegistry = finderRegistry;
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextClosedEvent ignored) {
|
||||
this.finderRegistry.unregister(this.pluginId);
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
this.finderRegistry.register(this.pluginId, event.getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
||||
private static class PluginWebSocketEndpointManager {
|
||||
|
||||
private final WebSocketEndpointManager manager;
|
||||
|
||||
private List<Object> endpoints;
|
||||
|
||||
private PluginWebSocketEndpointManager(WebSocketEndpointManager manager) {
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
var context = event.getApplicationContext();
|
||||
this.endpoints = context.getBeanProvider(Object.class)
|
||||
.orderedStream()
|
||||
.toList();
|
||||
manager.register(this.endpoints);
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextClosedEvent ignored) {
|
||||
manager.unregister(this.endpoints);
|
||||
}
|
||||
}
|
||||
|
||||
private static class PluginRouterFunctionManager {
|
||||
|
||||
private final PluginRouterFunctionRegistry routerFunctionRegistry;
|
||||
|
||||
private Collection<RouterFunction<ServerResponse>> routerFunctions;
|
||||
|
||||
private PluginRouterFunctionManager(PluginRouterFunctionRegistry routerFunctionRegistry) {
|
||||
this.routerFunctionRegistry = routerFunctionRegistry;
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextClosedEvent ignored) {
|
||||
if (routerFunctions != null) {
|
||||
routerFunctionRegistry.unregister(routerFunctions);
|
||||
}
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
var routerFunctions = event.getApplicationContext()
|
||||
.<RouterFunction<ServerResponse>>getBeanProvider(
|
||||
ResolvableType.forClassWithGenerics(RouterFunction.class, ServerResponse.class)
|
||||
)
|
||||
.orderedStream()
|
||||
.toList();
|
||||
routerFunctionRegistry.register(routerFunctions);
|
||||
this.routerFunctions = routerFunctions;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class PluginHandlerMappingManager {
|
||||
private final String pluginId;
|
||||
|
||||
private final PluginRequestMappingHandlerMapping handlerMapping;
|
||||
|
||||
private PluginHandlerMappingManager(String pluginId,
|
||||
PluginRequestMappingHandlerMapping handlerMapping) {
|
||||
this.pluginId = pluginId;
|
||||
this.handlerMapping = handlerMapping;
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
var context = event.getApplicationContext();
|
||||
context.getBeansWithAnnotation(Controller.class)
|
||||
.values()
|
||||
.forEach(controller ->
|
||||
handlerMapping.registerHandlerMethods(this.pluginId, controller)
|
||||
);
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(ContextClosedEvent ignored) {
|
||||
handlerMapping.unregister(this.pluginId);
|
||||
}
|
||||
}
|
||||
|
||||
private class SpringPluginStoppedEventAdapter
|
||||
implements ApplicationListener<ContextClosedEvent> {
|
||||
|
||||
private final String pluginId;
|
||||
|
||||
private SpringPluginStoppedEventAdapter(String pluginId) {
|
||||
this.pluginId = pluginId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextClosedEvent event) {
|
||||
var plugin = pluginManager.getPlugin(pluginId).getPlugin();
|
||||
if (plugin instanceof SpringPlugin springPlugin) {
|
||||
event.getApplicationContext()
|
||||
.publishEvent(new SpringPluginStoppedEvent(this, springPlugin));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class HaloPluginEventBridge {
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(SpringPluginStartedEvent event) {
|
||||
var pluginContext = event.getSpringPlugin().getPluginContext();
|
||||
var pluginWrapper = pluginManager.getPlugin(pluginContext.getName());
|
||||
|
||||
pluginManager.getRootContext()
|
||||
.publishEvent(new OpsPluginStartedEvent(this, pluginWrapper));
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(SpringPluginStoppingEvent event) {
|
||||
var pluginContext = event.getSpringPlugin().getPluginContext();
|
||||
var pluginWrapper = pluginManager.getPlugin(pluginContext.getName());
|
||||
pluginManager.getRootContext()
|
||||
.publishEvent(new OpsPluginBeforeStopEvent(this, pluginWrapper));
|
||||
}
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(SpringPluginStoppedEvent event) {
|
||||
var pluginContext = event.getSpringPlugin().getPluginContext();
|
||||
var pluginWrapper = pluginManager.getPlugin(pluginContext.getName());
|
||||
pluginManager.getRootContext()
|
||||
.publishEvent(new OpsPluginStoppedEvent(this, pluginWrapper));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<PropertySource<?>> resolvePropertySources(String pluginId,
|
||||
ResourceLoader resourceLoader) {
|
||||
var opsProperties = pluginManager.getRootContext()
|
||||
.getBeanProvider(PluginProperties.class)
|
||||
.getIfAvailable();
|
||||
if (opsProperties == null) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
var propertySourceLoader = new YamlPropertySourceLoader();
|
||||
var propertySources = new ArrayList<PropertySource<?>>();
|
||||
return propertySources;
|
||||
}
|
||||
|
||||
private List<PropertySource<?>> loadPropertySources(String propertySourceName,
|
||||
Resource resource,
|
||||
PropertySourceLoader propertySourceLoader) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Loading property sources from {}", resource);
|
||||
}
|
||||
if (!resource.exists()) {
|
||||
return List.of();
|
||||
}
|
||||
try {
|
||||
return propertySourceLoader.load(propertySourceName, resource);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to load property sources from " + resource, e);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import org.pf4j.DevelopmentPluginLoader;
|
||||
import org.pf4j.PluginDescriptor;
|
||||
import org.pf4j.PluginManager;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/13 10:50
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DevPluginLoader extends DevelopmentPluginLoader {
|
||||
|
||||
private final PluginProperties pluginProperties;
|
||||
|
||||
public DevPluginLoader(
|
||||
PluginManager pluginManager,
|
||||
PluginProperties pluginProperties
|
||||
) {
|
||||
super(pluginManager);
|
||||
this.pluginProperties = pluginProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassLoader loadPlugin(Path pluginPath, PluginDescriptor pluginDescriptor) {
|
||||
var classesDirectories = pluginProperties.getClassesDirectories();
|
||||
if (classesDirectories != null) {
|
||||
classesDirectories.forEach(
|
||||
classesDirectory -> pluginClasspath.addClassesDirectories(classesDirectory)
|
||||
);
|
||||
}
|
||||
var libDirectories = pluginProperties.getLibDirectories();
|
||||
if (libDirectories != null) {
|
||||
libDirectories.forEach(
|
||||
libDirectory -> pluginClasspath.addJarsDirectories(libDirectory)
|
||||
);
|
||||
}
|
||||
return super.loadPlugin(pluginPath, pluginDescriptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Path pluginPath) {
|
||||
// 目录加载插件只能在dev模式下
|
||||
return Files.isDirectory(pluginPath);
|
||||
}
|
||||
}
|
||||
|
@ -1,187 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import cd.casic.plugin.SpringPluginFactory;
|
||||
import cd.casic.plugin.YamlPluginDescriptorFinder;
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.dataobject.pojo.SpringPlugin;
|
||||
import cd.casic.plugin.event.PluginStartedEvent;
|
||||
import cd.casic.plugin.function.PluginGetter;
|
||||
import cd.casic.plugin.function.PluginsRootGetter;
|
||||
import cd.casic.plugin.function.SystemVersionSupplier;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.*;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.util.Lazy;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
* @description: manager plugin lifecycle
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 15:36
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class OpsPluginManager extends DefaultPluginManager implements SpringPluginManager, InitializingBean {
|
||||
|
||||
private final ApplicationContext rootContext;
|
||||
private Lazy<ApplicationContext> sharedContext;
|
||||
private final PluginProperties pluginProperties;
|
||||
private final PluginsRootGetter pluginsRootGetter;
|
||||
private final SystemVersionSupplier systemVersionSupplier;
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
//super#initialize会最早初始化,留空
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ExtensionFactory createExtensionFactory() {
|
||||
return new SpringExtensionFactory(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ExtensionFinder createExtensionFinder() {
|
||||
var finder = new SpringComponentsFinder(this);
|
||||
addPluginStateListener(finder);
|
||||
return finder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PluginFactory createPluginFactory() {
|
||||
var contextFactory = new DefaultPluginApplicationContextFactory(this);
|
||||
var pluginGetter = rootContext.getBean(PluginGetter.class);
|
||||
return new SpringPluginFactory(contextFactory, pluginGetter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PluginDescriptorFinder createPluginDescriptorFinder() {
|
||||
return new YamlPluginDescriptorFinder();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PluginLoader createPluginLoader() {
|
||||
var compoundLoader = new CompoundPluginLoader();
|
||||
compoundLoader.add(new DevPluginLoader(this, this.pluginProperties), this::isDevelopment);
|
||||
compoundLoader.add(new JarPluginLoader(this));
|
||||
return compoundLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PluginStatusProvider createPluginStatusProvider() {
|
||||
if (PropertyPluginStatusProvider.isPropertySet(pluginProperties)) {
|
||||
return new PropertyPluginStatusProvider(pluginProperties);
|
||||
}
|
||||
return super.createPluginStatusProvider();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PluginRepository createPluginRepository() {
|
||||
var developmentPluginRepository =
|
||||
new DefaultDevelopmentPluginRepository(getPluginsRoots());
|
||||
String restPathPrefix = pluginProperties.getRestPathPrefix();
|
||||
Path path = Paths.get(restPathPrefix);
|
||||
developmentPluginRepository
|
||||
.setFixedPaths(List.of(path));
|
||||
return new CompoundPluginRepository()
|
||||
.add(developmentPluginRepository, this::isDevelopment)
|
||||
.add(new JarPluginRepository(getPluginsRoots()))
|
||||
.add(new DefaultPluginRepository(getPluginsRoots()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Path> createPluginsRoot() {
|
||||
String s = pluginsRootGetter.get();
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startPlugins() {
|
||||
throw new UnsupportedOperationException(
|
||||
"don't do this operation,don't don't start all plugins"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopPlugins() {
|
||||
throw new UnsupportedOperationException(
|
||||
"don't do this operation.don't don't stop all plugins"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApplicationContext getRootContext() {
|
||||
return rootContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApplicationContext getSharedContext() {
|
||||
return sharedContext.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginWrapper> getDependents(String pluginId) {
|
||||
if (Objects.isNull(getPlugin(pluginId))) {
|
||||
return List.of();
|
||||
}
|
||||
var dependents = new ArrayList<PluginWrapper>();
|
||||
var stack = new Stack<String>();
|
||||
// 依赖管理
|
||||
dependencyResolver.getDependents(pluginId).forEach(stack::push);
|
||||
while (!stack.isEmpty()) {
|
||||
var dependent = stack.pop();
|
||||
var pluginWrapper = getPlugin(dependent);
|
||||
if (pluginWrapper != null) {
|
||||
dependents.add(pluginWrapper);
|
||||
dependencyResolver.getDependents(dependent).forEach(stack::push);
|
||||
}
|
||||
}
|
||||
return dependents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.runtimeMode = pluginProperties.getRuntimeMode();
|
||||
this.sharedContext = Lazy.of(() -> SharedApplicationContextFactory.create(rootContext));
|
||||
setExactVersionAllowed(pluginProperties.isEnable());
|
||||
setSystemVersion(systemVersionSupplier.get().toStableVersion().toString());
|
||||
super.initialize();
|
||||
// the listener must be after the super#initialize
|
||||
addPluginStateListener(new PluginStartedListener());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Listener for plugin started event.
|
||||
*
|
||||
* @author johnniang
|
||||
* @since 2.17.0
|
||||
*/
|
||||
private static class PluginStartedListener implements PluginStateListener {
|
||||
|
||||
@Override
|
||||
public void pluginStateChanged(PluginStateEvent event) {
|
||||
if (PluginState.STARTED.equals(event.getPluginState())) {
|
||||
var plugin = event.getPlugin().getPlugin();
|
||||
if (plugin instanceof SpringPlugin springPlugin) {
|
||||
try {
|
||||
springPlugin.getApplicationContext()
|
||||
.publishEvent(new PluginStartedEvent(this));
|
||||
} catch (Throwable t) {
|
||||
var pluginId = event.getPlugin().getPluginId();
|
||||
log.warn("Error while publishing plugin started event for plugin {}",
|
||||
pluginId, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.pf4j.RuntimeMode;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 10:58
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@RequiredArgsConstructor
|
||||
public class PluginContext {
|
||||
|
||||
public final String name;
|
||||
|
||||
public final String configMapName;
|
||||
|
||||
public final String version;
|
||||
|
||||
public final RuntimeMode runtimeMode;
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import org.springframework.util.*;
|
||||
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/13 10:35
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PluginRequestMappingHandlerMapping extends RequestMappingHandlerMapping {
|
||||
|
||||
private final MultiValueMap<String, RequestMappingInfo> pluginMappingInfo =
|
||||
new LinkedMultiValueMap<>();
|
||||
|
||||
@Override
|
||||
protected void initHandlerMethods() {
|
||||
}
|
||||
|
||||
public void registerHandlerMethods(String pluginId, Object handler) {
|
||||
|
||||
}
|
||||
|
||||
private String formatMappings(Class<?> userType, Map<Method, RequestMappingInfo> methods) {
|
||||
String packageName = ClassUtils.getPackageName(userType);
|
||||
String formattedType = (StringUtils.hasText(packageName)
|
||||
? Arrays.stream(packageName.split("\\."))
|
||||
.map(packageSegment -> packageSegment.substring(0, 1))
|
||||
.collect(Collectors.joining(".", "", "." + userType.getSimpleName())) :
|
||||
userType.getSimpleName());
|
||||
Function<Method, String> methodFormatter =
|
||||
method -> Arrays.stream(method.getParameterTypes())
|
||||
.map(Class::getSimpleName)
|
||||
.collect(Collectors.joining(",", "(", ")"));
|
||||
return methods.entrySet().stream()
|
||||
.map(e -> {
|
||||
Method method = e.getKey();
|
||||
return e.getValue() + ": " + method.getName() + methodFormatter.apply(method);
|
||||
})
|
||||
.collect(Collectors.joining("\n\t", "\n\t" + formattedType + ":" + "\n\t", ""));
|
||||
}
|
||||
|
||||
public void unregister(String pluginId) {
|
||||
Assert.notNull(pluginId, "The pluginId must not be null.");
|
||||
if (!pluginMappingInfo.containsKey(pluginId)) {
|
||||
return;
|
||||
}
|
||||
pluginMappingInfo.remove(pluginId).forEach(this::unregisterMapping);
|
||||
}
|
||||
|
||||
protected List<RequestMappingInfo> getMappings(String pluginId) {
|
||||
List<RequestMappingInfo> requestMappingInfos = pluginMappingInfo.get(pluginId);
|
||||
if (requestMappingInfos == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return List.copyOf(requestMappingInfos);
|
||||
}
|
||||
}
|
||||
|
@ -1,59 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.pf4j.PluginStatusProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 读取配置文件,ops.plugin.enabled-plugins读取可用和非可用的
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/13 10:44
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PropertyPluginStatusProvider implements PluginStatusProvider {
|
||||
|
||||
private final List<String> enabledPlugins;
|
||||
private final List<String> disabledPlugins;
|
||||
|
||||
public PropertyPluginStatusProvider(PluginProperties pluginProperties) {
|
||||
this.enabledPlugins = pluginProperties.getEnabledPlugins() != null
|
||||
? Arrays.asList(pluginProperties.getEnabledPlugins()) : new ArrayList<>();
|
||||
this.disabledPlugins = pluginProperties.getDisabledPlugins() != null
|
||||
? Arrays.asList(pluginProperties.getDisabledPlugins()) : new ArrayList<>();
|
||||
}
|
||||
|
||||
public static boolean isPropertySet(PluginProperties pluginProperties) {
|
||||
return !ArrayUtils.isEmpty(pluginProperties.getEnabledPlugins())
|
||||
&& !ArrayUtils.isEmpty(pluginProperties.getDisabledPlugins());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPluginDisabled(String pluginId) {
|
||||
if (disabledPlugins.contains(pluginId)) {
|
||||
return true;
|
||||
}
|
||||
return !enabledPlugins.isEmpty() && !enabledPlugins.contains(pluginId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disablePlugin(String pluginId) {
|
||||
if (isPluginDisabled(pluginId)) {
|
||||
return;
|
||||
}
|
||||
disabledPlugins.add(pluginId);
|
||||
enabledPlugins.remove(pluginId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enablePlugin(String pluginId) {
|
||||
if (!isPluginDisabled(pluginId)) {
|
||||
return;
|
||||
}
|
||||
enabledPlugins.add(pluginId);
|
||||
disabledPlugins.remove(pluginId);
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 16:19
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum SharedApplicationContextFactory {
|
||||
;
|
||||
|
||||
public static ApplicationContext create(ApplicationContext rootContext) {
|
||||
var sharedContext = new GenericApplicationContext();
|
||||
sharedContext.registerShutdownHook();
|
||||
var beanFactory = sharedContext.getBeanFactory();
|
||||
// register shared object here
|
||||
// var reactiveExtensionClient = rootContext.getBean(ReactiveExtensionClient.class);
|
||||
// beanFactory.registerSingleton("extensionClient", extensionClient);
|
||||
// beanFactory.registerSingleton("reactiveExtensionClient", reactiveExtensionClient);
|
||||
//
|
||||
// DefaultSchemeManager defaultSchemeManager =
|
||||
// rootContext.getBean(DefaultSchemeManager.class);
|
||||
// beanFactory.registerSingleton("schemeManager", defaultSchemeManager);
|
||||
// beanFactory.registerSingleton("externalUrlSupplier",
|
||||
// rootContext.getBean(ExternalUrlSupplier.class));
|
||||
// beanFactory.registerSingleton("serverSecurityContextRepository",
|
||||
// rootContext.getBean(ServerSecurityContextRepository.class));
|
||||
// beanFactory.registerSingleton("attachmentService",
|
||||
// rootContext.getBean(AttachmentService.class));
|
||||
// beanFactory.registerSingleton("backupRootGetter",
|
||||
// rootContext.getBean(BackupRootGetter.class));
|
||||
// beanFactory.registerSingleton("notificationReasonEmitter",
|
||||
// rootContext.getBean(NotificationReasonEmitter.class));
|
||||
// beanFactory.registerSingleton("notificationCenter",
|
||||
// rootContext.getBean(NotificationCenter.class));
|
||||
// beanFactory.registerSingleton("externalLinkProcessor",
|
||||
// rootContext.getBean(ExternalLinkProcessor.class));
|
||||
// beanFactory.registerSingleton("postContentService",
|
||||
// rootContext.getBean(PostContentService.class));
|
||||
// beanFactory.registerSingleton("cacheManager",
|
||||
// rootContext.getBean(CacheManager.class));
|
||||
// beanFactory.registerSingleton("loginHandlerEnhancer",
|
||||
// rootContext.getBean(LoginHandlerEnhancer.class));
|
||||
// rootContext.getBeanProvider(PluginsRootGetter.class)
|
||||
// .ifUnique(pluginsRootGetter ->
|
||||
// beanFactory.registerSingleton("pluginsRootGetter", pluginsRootGetter)
|
||||
// );
|
||||
// beanFactory.registerSingleton("extensionGetter",
|
||||
// rootContext.getBean(ExtensionGetter.class));
|
||||
// rootContext.getBeanProvider(CryptoService.class)
|
||||
// .ifUnique(
|
||||
// cryptoService -> beanFactory.registerSingleton("cryptoService", cryptoService)
|
||||
// );
|
||||
// rootContext.getBeanProvider(RateLimiterRegistry.class)
|
||||
// .ifUnique(rateLimiterRegistry ->
|
||||
// beanFactory.registerSingleton("rateLimiterRegistry", rateLimiterRegistry)
|
||||
// );
|
||||
//
|
||||
// // Authentication plugins may need this RequestCache to handle successful login redirect
|
||||
// rootContext.getBeanProvider(ServerRequestCache.class)
|
||||
// .ifUnique(serverRequestCache ->
|
||||
// beanFactory.registerSingleton("serverRequestCache", serverRequestCache)
|
||||
// );
|
||||
// rootContext.getBeanProvider(UserService.class)
|
||||
// .ifUnique(userService -> beanFactory.registerSingleton("userService", userService));
|
||||
// rootContext.getBeanProvider(RoleService.class)
|
||||
// .ifUnique(roleService -> beanFactory.registerSingleton("roleService", roleService));
|
||||
// rootContext.getBeanProvider(ReactiveUserDetailsService.class)
|
||||
// .ifUnique(userDetailsService ->
|
||||
// beanFactory.registerSingleton("userDetailsService", userDetailsService)
|
||||
// );
|
||||
// rootContext.getBeanProvider(SystemInfoGetter.class)
|
||||
// .ifUnique(systemInfoGetter ->
|
||||
// beanFactory.registerSingleton("systemInfoGetter", systemInfoGetter)
|
||||
// );
|
||||
// TODO add more shared instance here
|
||||
sharedContext.refresh();
|
||||
return sharedContext;
|
||||
}
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.*;
|
||||
import org.pf4j.processor.ExtensionStorage;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @description: find idx file and load extensions
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 18:58
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
public class SpringComponentsFinder extends AbstractExtensionFinder {
|
||||
|
||||
public static final String EXTENSIONS_RESOURCE = "META-INF/plugin-components.idx";
|
||||
|
||||
public SpringComponentsFinder(PluginManager pluginManager) {
|
||||
super(pluginManager);
|
||||
entries = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Set<String>> readPluginsStorages() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Set<String>> readClasspathStorages() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private Set<String> readPluginStorage(PluginWrapper pluginWrapper) {
|
||||
var pluginId = pluginWrapper.getPluginId();
|
||||
log.debug("Reading extensions storage from plugin '{}'", pluginId);
|
||||
var bucket = new HashSet<String>();
|
||||
try {
|
||||
log.debug("Read '{}'", EXTENSIONS_RESOURCE);
|
||||
var classLoader = pluginWrapper.getPluginClassLoader();
|
||||
try (var resourceStream = classLoader.getResourceAsStream(EXTENSIONS_RESOURCE)) {
|
||||
if (resourceStream == null) {
|
||||
log.debug("Cannot find '{}'", EXTENSIONS_RESOURCE);
|
||||
} else {
|
||||
collectExtensions(resourceStream, bucket);
|
||||
}
|
||||
}
|
||||
debugExtensions(bucket);
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to read components from " + EXTENSIONS_RESOURCE, e);
|
||||
}
|
||||
return bucket;
|
||||
}
|
||||
|
||||
private void collectExtensions(InputStream inputStream, Set<String> bucket) throws IOException {
|
||||
try (Reader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
|
||||
ExtensionStorage.read(reader, bucket);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pluginStateChanged(PluginStateEvent event) {
|
||||
var pluginState = event.getPluginState();
|
||||
String pluginId = event.getPlugin().getPluginId();
|
||||
if (pluginState == PluginState.UNLOADED) {
|
||||
entries.remove(pluginId);
|
||||
} else if (pluginState == PluginState.CREATED || pluginState == PluginState.RESOLVED) {
|
||||
entries.computeIfAbsent(pluginId, id -> readPluginStorage(event.getPlugin()));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
package cd.casic.plugin.core;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.SpringPlugin;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.ExtensionFactory;
|
||||
import org.pf4j.PluginManager;
|
||||
import org.pf4j.PluginWrapper;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Comparator;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/12 16:58
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class SpringExtensionFactory implements ExtensionFactory {
|
||||
|
||||
protected final PluginManager pluginManager;
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T> T create(Class<T> extensionClass) {
|
||||
return getPluginApplicationContextBy(extensionClass)
|
||||
.map(context -> context.getBean(extensionClass))
|
||||
.orElseGet(() -> createWithoutSpring(extensionClass));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T> T createWithoutSpring(final Class<T> extensionClass)
|
||||
throws IllegalArgumentException {
|
||||
final Constructor<?> constructor =
|
||||
getPublicConstructorWithShortestParameterList(extensionClass)
|
||||
// An extension class is required to have at least one public constructor.
|
||||
.orElseThrow(
|
||||
() -> new IllegalArgumentException("Extension class '" + nameOf(extensionClass)
|
||||
+ "' must have at least one public constructor."));
|
||||
try {
|
||||
if (log.isTraceEnabled()) {
|
||||
log.trace("Instantiate '" + nameOf(extensionClass) + "' by calling '" + constructor
|
||||
+ "'with standard Java reflection.");
|
||||
}
|
||||
// Creating the instance by calling the constructor with null-parameters (if there are any).
|
||||
return (T) constructor.newInstance(nullParameters(constructor));
|
||||
} catch (InstantiationException | IllegalAccessException | InvocationTargetException ex) {
|
||||
// If one of these exceptions is thrown it it most likely because of NPE inside the
|
||||
// called constructor and
|
||||
// not the reflective call itself as we precisely searched for a fitting constructor.
|
||||
log.error(ex.getMessage(), ex);
|
||||
throw new RuntimeException(
|
||||
"Most likely this exception is thrown because the called constructor ("
|
||||
+ constructor + ")"
|
||||
+ " cannot handle 'null' parameters. Original message was: "
|
||||
+ ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
private Optional<Constructor<?>> getPublicConstructorWithShortestParameterList(
|
||||
final Class<?> extensionClass) {
|
||||
return Stream.of(extensionClass.getConstructors())
|
||||
.min(Comparator.comparing(Constructor::getParameterCount));
|
||||
}
|
||||
|
||||
private Object[] nullParameters(final Constructor<?> constructor) {
|
||||
return new Object[constructor.getParameterCount()];
|
||||
}
|
||||
|
||||
protected <T> Optional<ApplicationContext> getPluginApplicationContextBy(
|
||||
final Class<T> extensionClass) {
|
||||
return Optional.ofNullable(this.pluginManager.whichPlugin(extensionClass))
|
||||
.map(PluginWrapper::getPlugin)
|
||||
.filter(SpringPlugin.class::isInstance)
|
||||
.map(plugin -> (SpringPlugin) plugin)
|
||||
.map(SpringPlugin::getApplicationContext);
|
||||
}
|
||||
|
||||
private <T> String nameOf(final Class<T> clazz) {
|
||||
return clazz.getName();
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package cd.casic.plugin.core.check;
|
||||
|
||||
/**
|
||||
* @description: 插件运行前检查器
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/16 9:34
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface PluginRunningBeforeChecker {
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:08
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ApplicationContextPluginProcessor implements IPluginProcessor {
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
if (plugin.getApplicationContextIsRefresh()) {
|
||||
return;
|
||||
}
|
||||
plugin.getPluginApplicationContext().setClassLoader(plugin.getPluginWrapper().getPluginClassLoader());
|
||||
plugin.getPluginApplicationContext().getDefaultListableBeanFactory()
|
||||
.registerSingleton(plugin.getPluginWrapper().getPluginId().trim(),
|
||||
plugin.getPluginWrapper().getPlugin());
|
||||
plugin.getPluginApplicationContext().refresh();
|
||||
plugin.setApplicationContextIsRefresh(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
// 获取插件ApplicationContext的DefaultListableBeanFactory实例
|
||||
DefaultListableBeanFactory beanFactory = plugin.getPluginApplicationContext().getDefaultListableBeanFactory();
|
||||
// 根据插件ID获取Bean的名称
|
||||
String[] beanNames = beanFactory.getBeanNamesForType(plugin.getPluginWrapper().getPlugin().getClass());
|
||||
Arrays.stream(beanNames)
|
||||
.filter(beanName -> beanName.equals(plugin.getPluginWrapper().getPluginId().trim()))
|
||||
.forEach(beanFactory::destroySingleton);
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.core.BasePlugin;
|
||||
import cd.casic.plugin.core.register.filter.PluginClassFilter;
|
||||
import cd.casic.plugin.core.register.filter.impl.*;
|
||||
import cd.casic.plugin.dataobject.dao.PluginFacadeMemoryCache;
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cd.casic.plugin.utils.PluginsUtils.scanClassPackageName;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 17:17
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ClassGroupProcessor implements IPluginProcessor {
|
||||
|
||||
private final List<PluginClassFilter> classFilters = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
classFilters.add(new BasicBeanFilter());
|
||||
classFilters.add(new ControllerFilter());
|
||||
classFilters.add(new DataBaseEntityFilter());
|
||||
classFilters.add(new MapperFilter());
|
||||
classFilters.add(new PluginConfigurationFilter());
|
||||
classFilters.add(new WebSocketFilter());
|
||||
log.info("Start to hand the ClassGroup Class for plugin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
List<Class<?>> classList = new ArrayList<>();
|
||||
Set<String> classPackageName = scanClassPackageName(plugin.getBasePlugin().scanPackage(), plugin.getBasePlugin().getWrapper());
|
||||
for (String packageName : classPackageName) {
|
||||
ClassLoader loader = PluginFacadeMemoryCache.getPluginClassLoader(plugin.getPluginId());
|
||||
log.info("Load class {} using classloader {} for plugin {}", packageName, PluginFacadeMemoryCache.getPluginInfo(plugin.getPluginId()), plugin.getPluginId());
|
||||
Class<?> clazz = loader.loadClass(packageName);
|
||||
if (!BasePlugin.class.isAssignableFrom(clazz)) {
|
||||
classList.add(clazz);
|
||||
}
|
||||
}
|
||||
plugin.setClassList(classList);
|
||||
List<Class<?>> pluginClassList = plugin.getClassList().stream().filter(item -> !item.isInterface()).collect(Collectors.toList());
|
||||
if (!pluginClassList.isEmpty()) {
|
||||
for (Class<?> clazz : pluginClassList) {
|
||||
boolean grouped = false;
|
||||
for (PluginClassFilter filter : classFilters) {
|
||||
if (filter.filter(clazz)) {
|
||||
log.info("将类 {} 添加到 {} 分组", clazz, filter.groupName());
|
||||
plugin.addGroupClass(filter.groupName(), clazz);
|
||||
grouped = true;
|
||||
}
|
||||
}
|
||||
if (!grouped) {
|
||||
log.info("类 {} 不属于任何已知分组", clazz);
|
||||
plugin.addGroupClass("unknown", clazz);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
plugin.getClassList().clear();
|
||||
}
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.core.register.filter.impl.ControllerFilter;
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ControllerProcessor implements IPluginProcessor {
|
||||
|
||||
RequestMappingHandlerMapping requestMappingHandlerMapping;
|
||||
|
||||
Method getMappingForMethod;
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
// 这里反射获取 getMappingForMethod
|
||||
requestMappingHandlerMapping = SpringUtil.getBean(RequestMappingHandlerMapping.class);
|
||||
getMappingForMethod = ReflectionUtils.findMethod(RequestMappingHandlerMapping.class, "getMappingForMethod", Method.class, Class.class);
|
||||
getMappingForMethod.setAccessible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
ApplicationContext applicationContext = plugin.getMainApplicationContext();
|
||||
PluginProperties pluginSystemProperties = applicationContext.getBean(PluginProperties.class);
|
||||
for (Class<?> aClass : plugin.getGroupClass(ControllerFilter.GROUP_NAME)) {
|
||||
setPathPrefix(plugin.getPluginId(), aClass, pluginSystemProperties);
|
||||
plugin.addController(aClass);
|
||||
Object bean = plugin.getPluginApplicationContext().getBean(aClass);
|
||||
Method[] methods = aClass.getMethods();
|
||||
for (Method method : methods) {
|
||||
if (method.getAnnotation(RequestMapping.class) != null
|
||||
|| method.getAnnotation(GetMapping.class) != null
|
||||
|| method.getAnnotation(PostMapping.class) != null
|
||||
|| method.getAnnotation(DeleteMapping.class) != null
|
||||
|| method.getAnnotation(PutMapping.class) != null
|
||||
|| method.getAnnotation(PatchMapping.class) != null) {
|
||||
RequestMappingInfo requestMappingInfo = (RequestMappingInfo) getMappingForMethod.invoke(requestMappingHandlerMapping, method, aClass);
|
||||
requestMappingHandlerMapping.registerMapping(requestMappingInfo, bean, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
for (RequestMappingInfo requestMappingInfo : getRequestMappingInfo(plugin)) {
|
||||
requestMappingHandlerMapping.unregisterMapping(requestMappingInfo);
|
||||
}
|
||||
}
|
||||
|
||||
List<RequestMappingInfo> getRequestMappingInfo(PluginInfo plugin) throws Exception {
|
||||
List<RequestMappingInfo> requestMappingInfoList = new ArrayList<>();
|
||||
for (Class<?> aClass : plugin.getGroupClass(ControllerFilter.GROUP_NAME)) {
|
||||
Method[] methods = aClass.getMethods();
|
||||
for (Method method : methods) {
|
||||
RequestMappingInfo requestMappingInfo = (RequestMappingInfo) getMappingForMethod.invoke(requestMappingHandlerMapping, method, aClass);
|
||||
requestMappingInfoList.add(requestMappingInfo);
|
||||
}
|
||||
}
|
||||
return requestMappingInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求路径前缀
|
||||
*
|
||||
* @param aClass controller 类
|
||||
*/
|
||||
private void setPathPrefix(String pluginId, Class<?> aClass, PluginProperties pluginSystemProperties) {
|
||||
RequestMapping requestMapping = aClass.getAnnotation(RequestMapping.class);
|
||||
if (requestMapping == null) {
|
||||
return;
|
||||
}
|
||||
String pathPrefix = pluginSystemProperties.getRestPathPrefix();
|
||||
if (pluginSystemProperties.isEnablePluginIdAsRestPrefix()) {
|
||||
if (StrUtil.isNotEmpty(pathPrefix)) {
|
||||
pathPrefix = joiningPath(pathPrefix, pluginId);
|
||||
} else {
|
||||
pathPrefix = pluginId;
|
||||
}
|
||||
} else {
|
||||
if (StrUtil.isEmpty(pathPrefix)) {
|
||||
// 不启用插件id作为路径前缀, 并且路径前缀为空, 则直接返回。
|
||||
return;
|
||||
}
|
||||
}
|
||||
handleRequestMapping(requestMapping, pathPrefix);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void handleRequestMapping(RequestMapping requestMapping, String pathPrefix) {
|
||||
InvocationHandler invocationHandler = Proxy.getInvocationHandler(requestMapping);
|
||||
Set<String> definePaths = new HashSet<>();
|
||||
definePaths.addAll(Arrays.asList(requestMapping.path()));
|
||||
definePaths.addAll(Arrays.asList(requestMapping.value()));
|
||||
try {
|
||||
Field field = invocationHandler.getClass().getDeclaredField("memberValues");
|
||||
field.setAccessible(true);
|
||||
Map<String, Object> memberValues = (Map<String, Object>) field.get(invocationHandler);
|
||||
String[] newPath = new String[definePaths.size()];
|
||||
int i = 0;
|
||||
for (String definePath : definePaths) {
|
||||
// 解决插件启用、禁用后, 路径前缀重复的问题。
|
||||
if (definePath.contains(pathPrefix)) {
|
||||
newPath[i++] = definePath;
|
||||
} else {
|
||||
newPath[i++] = joiningPath(pathPrefix, definePath);
|
||||
}
|
||||
}
|
||||
if (newPath.length == 0) {
|
||||
newPath = new String[]{pathPrefix};
|
||||
}
|
||||
memberValues.put("path", newPath);
|
||||
memberValues.put("value", new String[]{});
|
||||
} catch (Exception e) {
|
||||
log.error("Define Plugin RestController pathPrefix error : {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接路径
|
||||
*
|
||||
* @param path1 路径1
|
||||
* @param path2 路径2
|
||||
* @return 拼接的路径
|
||||
*/
|
||||
private String joiningPath(String path1, String path2) {
|
||||
if (path1 != null && path2 != null) {
|
||||
if (path1.endsWith("/") && path2.startsWith("/")) {
|
||||
return path1 + path2.substring(1);
|
||||
} else if (!path1.endsWith("/") && !path2.startsWith("/")) {
|
||||
return path1 + "/" + path2;
|
||||
} else {
|
||||
return path1 + path2;
|
||||
}
|
||||
} else if (path1 != null) {
|
||||
return path1;
|
||||
} else if (path2 != null) {
|
||||
return path2;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import com.anwen.mongo.annotation.collection.CollectionName;
|
||||
import com.anwen.mongo.conn.CollectionManager;
|
||||
import com.anwen.mongo.conn.ConnectMongoDB;
|
||||
import com.anwen.mongo.convert.CollectionNameConvert;
|
||||
import com.anwen.mongo.manager.MongoPlusClient;
|
||||
import com.anwen.mongo.mapper.BaseMapper;
|
||||
import com.anwen.mongo.service.IService;
|
||||
import com.anwen.mongo.service.impl.ServiceImpl;
|
||||
import com.mongodb.MongoException;
|
||||
import com.mongodb.client.MongoCollection;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bson.Document;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 18:25
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MongoProcessor implements IPluginProcessor {
|
||||
|
||||
private AnnotationConfigApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
log.info("Start to hand the Mongo Class for plugin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
applicationContext = plugin.getPluginApplicationContext();
|
||||
applicationContext.getBeansOfType(IService.class)
|
||||
.values()
|
||||
.stream()
|
||||
.filter(s -> s instanceof ServiceImpl)
|
||||
.forEach(s -> {
|
||||
Class<?> clazz = s.getGenericityClass();
|
||||
ServiceImpl<?> serviceImpl = (ServiceImpl<?>) s;
|
||||
serviceImpl.setClazz(clazz);
|
||||
String database = initFactory(clazz);
|
||||
// 这里需要将MongoPlusClient给工厂
|
||||
serviceImpl.setDatabase(database);
|
||||
serviceImpl.setBaseMapper(applicationContext.getBean("baseMapper", BaseMapper.class));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
//卸载暂时都先不处理
|
||||
}
|
||||
|
||||
private String initFactory(Class<?> clazz) {
|
||||
String collectionName = clazz.getSimpleName().toLowerCase();
|
||||
final String[] dataBaseName = {""};
|
||||
if (clazz.isAnnotationPresent(CollectionName.class)) {
|
||||
CollectionName annotation = clazz.getAnnotation(CollectionName.class);
|
||||
collectionName = annotation.value();
|
||||
dataBaseName[0] = annotation.database();
|
||||
}
|
||||
try {
|
||||
String finalCollectionName = collectionName;
|
||||
final String[] finalDataBaseName = {dataBaseName[0]};
|
||||
List<MongoDatabase> mongoDatabaseList = new ArrayList<>();
|
||||
MongoPlusClient mongoPlusClient = applicationContext.getBean("mongoPlusClient", MongoPlusClient.class);
|
||||
String database = mongoPlusClient.getBaseProperty().getDatabase();
|
||||
Arrays.stream(database.split(",")).collect(Collectors.toList()).forEach(db -> {
|
||||
CollectionNameConvert collectionNameConvert = applicationContext.getBean("collectionNameConvert", CollectionNameConvert.class);
|
||||
CollectionManager collectionManager = new CollectionManager(mongoPlusClient.getMongoClient(), collectionNameConvert, db);
|
||||
ConnectMongoDB connectMongodb = new ConnectMongoDB(mongoPlusClient.getMongoClient(), db, finalCollectionName);
|
||||
MongoDatabase mongoDatabase = mongoPlusClient.getMongoClient().getDatabase(db);
|
||||
mongoDatabaseList.add(mongoDatabase);
|
||||
if (Objects.equals(db, finalDataBaseName[0])) {
|
||||
MongoCollection<Document> collection = connectMongodb.open(mongoDatabase);
|
||||
collectionManager.setCollectionMap(finalCollectionName, collection);
|
||||
}
|
||||
mongoPlusClient.getCollectionManager().put(db, collectionManager);
|
||||
});
|
||||
mongoPlusClient.setMongoDatabase(mongoDatabaseList);
|
||||
} catch (MongoException e) {
|
||||
log.error("Failed to connect to MongoDB: {}", e.getMessage(), e);
|
||||
}
|
||||
return dataBaseName[0];
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.pf4j.util.FileUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import static cd.casic.plugin.constants.PluginConstants.PLUGINS_RESOURCES_DIR;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:14
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ResourcesProcessor implements IPluginProcessor {
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
Path pluginPath = plugin.getPluginWrapper().getPluginPath();
|
||||
Set<String> staticClassPathLocations = plugin.getStaticClassPathLocations();
|
||||
File jarFile = null;
|
||||
if (Files.isDirectory(pluginPath)) {
|
||||
List<File> jars = FileUtils.getJars(pluginPath);
|
||||
jarFile = jars.get(0);
|
||||
} else if (pluginPath.toFile().getName().toLowerCase().endsWith(".jar")) {
|
||||
jarFile = pluginPath.toFile();
|
||||
} else {
|
||||
throw new RuntimeException("不正确的pluginPath");
|
||||
}
|
||||
Enumeration<JarEntry> jarEntries = new JarFile(jarFile).entries();
|
||||
File file = new File(PLUGINS_RESOURCES_DIR + File.separator + plugin.getPluginId());
|
||||
if (!file.exists()) {
|
||||
FileUtil.mkdir(file);
|
||||
}
|
||||
FileUtil.clean(file);
|
||||
while (jarEntries.hasMoreElements()) {
|
||||
JarEntry entry = jarEntries.nextElement();
|
||||
String jarEntryName = entry.getName();
|
||||
for (String staticClassPathLocation : staticClassPathLocations) { //staticClassPathLocation里读取到所有静态资源的位置 然后将以插件为单位 打包到web的static目录下 即可访问
|
||||
if (!staticClassPathLocation.equals(jarEntryName) && jarEntryName.startsWith(staticClassPathLocation)
|
||||
&& !jarEntryName.endsWith(".class") && !entry.isDirectory()) {
|
||||
URL url = new URL("jar:file:" + jarFile.getAbsolutePath() + "!/" + jarEntryName);
|
||||
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
|
||||
InputStream in = jarConnection.getInputStream();
|
||||
File file1 = new File(file.getAbsolutePath() + File.separator + jarEntryName);
|
||||
FileUtil.touch(file1.getAbsolutePath());
|
||||
int index;
|
||||
byte[] bytes = new byte[1024];
|
||||
FileOutputStream downloadFile = new FileOutputStream(file.getAbsolutePath() + File.separator + jarEntryName);
|
||||
while ((index = in.read(bytes)) != -1) {
|
||||
downloadFile.write(bytes, 0, index);
|
||||
downloadFile.flush();
|
||||
}
|
||||
downloadFile.close();
|
||||
in.close();
|
||||
JarFile currJarFile = jarConnection.getJarFile();
|
||||
currJarFile.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
File file = new File(PLUGINS_RESOURCES_DIR + File.separator + plugin.getPluginId());
|
||||
if (file.exists()) {
|
||||
FileUtil.del(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.core.register.filter.impl.BasicBeanFilter;
|
||||
import cd.casic.plugin.core.register.filter.impl.ControllerFilter;
|
||||
import cd.casic.plugin.core.register.filter.impl.MapperFilter;
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:17
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SpringBeanRegisterProcessor implements IPluginProcessor {
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
List<Class<?>> basicBeanClassList = new ArrayList<>();
|
||||
basicBeanClassList.addAll(plugin.getGroupClass(BasicBeanFilter.GROUP_NAME));
|
||||
basicBeanClassList.addAll(plugin.getGroupClass(MapperFilter.GROUP_NAME));
|
||||
basicBeanClassList.addAll(plugin.getGroupClass(ControllerFilter.GROUP_NAME));
|
||||
// if(!basicBeanClassList.isEmpty()){
|
||||
// plugin.getPluginApplicationContext().register(basicBeanClassList.toArray(new Class[0]));
|
||||
// }
|
||||
basicBeanClassList.forEach(clazz -> {
|
||||
AnnotatedGenericBeanDefinition beanDefinition = new AnnotatedGenericBeanDefinition(clazz);
|
||||
beanDefinition.setBeanClass(clazz);
|
||||
BeanNameGenerator beanNameGenerator = new AnnotationBeanNameGenerator();
|
||||
String beanName = beanNameGenerator.generateBeanName(beanDefinition, plugin.getPluginApplicationContext());
|
||||
plugin.getPluginApplicationContext().registerBeanDefinition(beanName, beanDefinition);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springdoc.api.AbstractOpenApiResource;
|
||||
import org.springdoc.core.service.OpenAPIService;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:17
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SpringDocProcessor implements IPluginProcessor {
|
||||
private Set<Class<?>> restControllers;
|
||||
private OpenAPIService openAPIService;
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
ApplicationContext applicationContext = SpringUtil.getApplicationContext();
|
||||
AbstractOpenApiResource openApiResource = applicationContext.getBean(AbstractOpenApiResource.class);
|
||||
try {
|
||||
// 获取OpenApiResource的ADDITIONAL_REST_CONTROLLERS字段
|
||||
Field additionalRestControllers = ReflectUtil.getField(openApiResource.getClass(), "ADDITIONAL_REST_CONTROLLERS");
|
||||
additionalRestControllers.setAccessible(true);
|
||||
restControllers = (Set<Class<?>>) additionalRestControllers.get(openApiResource);
|
||||
} catch (IllegalAccessException e) {
|
||||
restControllers = null;
|
||||
}
|
||||
openAPIService = applicationContext.getBean(OpenAPIService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
if (restControllers != null) {
|
||||
// 将插件中的Controller类添加到OpenApiResource的ADDITIONAL_REST_CONTROLLERS字段
|
||||
restControllers.addAll(plugin.getControllers());
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
if (restControllers != null && !restControllers.isEmpty()) {
|
||||
for (Class<?> clazz : plugin.getControllers()) {
|
||||
// 从OpenApiResource的ADDITIONAL_REST_CONTROLLERS字段中移除插件中的Controller类
|
||||
restControllers.remove(clazz);
|
||||
}
|
||||
refresh();
|
||||
plugin.getControllers().clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
if (openAPIService != null) {
|
||||
// 手动刷新OpenApiResource
|
||||
openAPIService.setCachedOpenAPI(null, Locale.getDefault());
|
||||
// openAPIService.resetCalculatedOpenAPI();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
package cd.casic.plugin.core.register;
|
||||
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 20:19
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class StartPluginManagerProcessor implements IPluginProcessor {
|
||||
|
||||
@Resource
|
||||
private List<IPluginProcessor> iPluginProcessors;
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
iPluginProcessors.stream().forEach(var -> {
|
||||
try {
|
||||
var.initialize();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
iPluginProcessors.stream().forEach(var -> {
|
||||
try {
|
||||
var.registry(plugin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
iPluginProcessors.stream().forEach(var -> {
|
||||
try {
|
||||
var.unRegistry(plugin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
package cd.casic.plugin.core.register.config;
|
||||
|
||||
import cd.casic.plugin.annotation.PluginConfiguration;
|
||||
import cd.casic.plugin.config.PluginProperties;
|
||||
import cd.casic.plugin.dataobject.pojo.PluginInfo;
|
||||
import cd.casic.plugin.function.IPluginProcessor;
|
||||
import cd.casic.plugin.utils.ConfigFileUtils;
|
||||
import cd.casic.plugin.utils.PathUtils;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.TreeTraversingParser;
|
||||
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
|
||||
import com.fasterxml.jackson.dataformat.yaml.YAMLParser;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.pf4j.RuntimeMode;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Path;
|
||||
|
||||
/**
|
||||
* @description: 自定义的配置文件
|
||||
* @author: mianbin
|
||||
* @date: 2025/5/22 9:45
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigurationFileProcessor implements IPluginProcessor {
|
||||
|
||||
private final PluginProperties pluginProperties;
|
||||
|
||||
@Override
|
||||
public void initialize() throws Exception {
|
||||
log.info("Start to hand the configuration Class for plugin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registry(PluginInfo plugin) throws Exception {
|
||||
RuntimeMode runtimeMode = pluginProperties.getRuntimeMode();
|
||||
for (Class<?> aClass : plugin.getClassList()) {
|
||||
PluginConfiguration configDefinition = aClass.getAnnotation(PluginConfiguration.class);
|
||||
if (configDefinition == null) {
|
||||
continue;
|
||||
}
|
||||
String fileName = getConfigFileName(configDefinition, runtimeMode);
|
||||
DefaultListableBeanFactory defaultListableBeanFactory = plugin.getPluginApplicationContext().getDefaultListableBeanFactory();
|
||||
String name = aClass.getSimpleName();
|
||||
Path yamlPath = PathUtils.getYamlPath(plugin.getPluginWrapper().getPluginPath(), fileName);
|
||||
Resource resource = new FileSystemResource(yamlPath);
|
||||
Object parseObject = convert(resource, aClass);
|
||||
if (!defaultListableBeanFactory.containsSingleton(name)) {
|
||||
defaultListableBeanFactory.registerSingleton(name, parseObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegistry(PluginInfo plugin) throws Exception {
|
||||
if (!plugin.getPluginConfigObjects().isEmpty()) {
|
||||
plugin.getPluginConfigObjects().clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取插件独立配置文件的文件名
|
||||
*
|
||||
* @param pluginConfiguration 插件配置类上的自定义注解
|
||||
* @param runtimeMode 插件系统运行模式
|
||||
* @return 插件独立配置文件的文件名
|
||||
*/
|
||||
private String getConfigFileName(PluginConfiguration pluginConfiguration, RuntimeMode runtimeMode) {
|
||||
String fileName = pluginConfiguration.fileName();
|
||||
if (StringUtils.isBlank(fileName)) {
|
||||
return null;
|
||||
}
|
||||
String suffix = "";
|
||||
if (runtimeMode == RuntimeMode.DEPLOYMENT) {
|
||||
// deployment模式
|
||||
suffix = pluginConfiguration.deploySuffix();
|
||||
} else if (runtimeMode == RuntimeMode.DEVELOPMENT) {
|
||||
// development模式
|
||||
suffix = pluginConfiguration.devSuffix();
|
||||
}
|
||||
return ConfigFileUtils.joinConfigFileName(fileName, suffix);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Object convert(Resource resource, Class<?> configClass) throws Exception {
|
||||
// 创建 ObjectMapper 和 YAMLFactory 实例
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
YAMLFactory yamlFactory = new YAMLFactory();
|
||||
|
||||
// 使用 try-with-resources 语句自动管理资源
|
||||
try (InputStream inputStream = resource.getInputStream();
|
||||
YAMLParser yamlParser = yamlFactory.createParser(inputStream)) {
|
||||
final JsonNode node = objectMapper.readTree(yamlParser);
|
||||
if (node == null) {
|
||||
return configClass.getConstructor().newInstance();
|
||||
}
|
||||
try (TreeTraversingParser treeTraversingParser = new TreeTraversingParser(node)) {
|
||||
return objectMapper.readValue(treeTraversingParser, configClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user