Просмотр исходного кода

1、添加sckw-common-startup
2、启动类调整
3、links、isBindManyRole参数移至bootstarp.yml

zk 2 лет назад
Родитель
Сommit
5d0a636301
30 измененных файлов с 191 добавлено и 365 удалено
  1. 5 39
      sckw-auth/pom.xml
  2. 4 12
      sckw-auth/src/main/java/com/sckw/auth/AuthApplication.java
  3. 0 2
      sckw-auth/src/main/resources/bootstrap-dev.yml
  4. 7 1
      sckw-auth/src/main/resources/bootstrap.yml
  5. 1 0
      sckw-common/pom.xml
  6. 6 0
      sckw-common/sckw-common-bom/pom.xml
  7. 1 6
      sckw-common/sckw-common-remote/src/main/java/com/sckw/remote/annotation/SckwRemoteApplication.java
  8. 60 0
      sckw-common/sckw-common-startup/pom.xml
  9. 15 0
      sckw-common/sckw-common-startup/src/main/java/com/sckw/startup/annotation/SckwCloudApplication.java
  10. 5 39
      sckw-modules/sckw-file/pom.xml
  11. 5 14
      sckw-modules/sckw-file/src/main/java/com/sckw/file/FileApplication.java
  12. 0 1
      sckw-modules/sckw-file/src/main/resources/bootstrap-dev.yml
  13. 7 1
      sckw-modules/sckw-file/src/main/resources/bootstrap.yml
  14. 5 39
      sckw-modules/sckw-message/pom.xml
  15. 4 8
      sckw-modules/sckw-message/src/main/java/com/sckw/message/MessageApplication.java
  16. 3 0
      sckw-modules/sckw-message/src/main/resources/bootstrap.yml
  17. 5 30
      sckw-modules/sckw-order/pom.xml
  18. 4 9
      sckw-modules/sckw-order/src/main/java/com/sckw/order/OrderApplication.java
  19. 3 0
      sckw-modules/sckw-order/src/main/resources/bootstrap.yml
  20. 5 30
      sckw-modules/sckw-product/pom.xml
  21. 4 10
      sckw-modules/sckw-product/src/main/java/com/sckw/product/ProductApplication.java
  22. 3 0
      sckw-modules/sckw-product/src/main/resources/bootstrap.yml
  23. 5 39
      sckw-modules/sckw-system/pom.xml
  24. 10 15
      sckw-modules/sckw-system/src/main/java/com/sckw/system/SystemApplication.java
  25. 0 2
      sckw-modules/sckw-system/src/main/resources/bootstrap-dev.yml
  26. 7 1
      sckw-modules/sckw-system/src/main/resources/bootstrap.yml
  27. 5 55
      sckw-modules/sckw-transport/pom.xml
  28. 5 9
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/TransPortApplication.java
  29. 0 2
      sckw-modules/sckw-transport/src/main/resources/bootstrap-dev.yml
  30. 7 1
      sckw-modules/sckw-transport/src/main/resources/bootstrap.yml

+ 5 - 39
sckw-auth/pom.xml

@@ -23,6 +23,11 @@
 
     <dependencies>
         <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -43,45 +48,6 @@
             <artifactId>sckw-system-api</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
     </dependencies>
 
 </project>

+ 4 - 12
sckw-auth/src/main/java/com/sckw/auth/AuthApplication.java

@@ -1,25 +1,17 @@
 package com.sckw.auth;
 
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.web.servlet.ServletComponentScan;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @Author xucaiqin
  * @date 2023-06-01 15:02:02
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
-@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
+@SckwRemoteApplication
+@SckwCloudApplication
 public class AuthApplication {
     public static void main(String[] args) {
-        // 关闭nacos日志
-        //System.setProperty("nacos.logging.default.config.enabled", "false");
         SpringApplication.run(AuthApplication.class, args);
     }
 }

+ 0 - 2
sckw-auth/src/main/resources/bootstrap-dev.yml

@@ -80,5 +80,3 @@ dubbo:
     protocol: nacos
     #use-as-config-center: false
     #use-as-metadata-center: false
-
-links: /auth/login,/kwsUser/resetPassword,/kwsUser/updatePassword,/kwsUser/forgetPassword

+ 7 - 1
sckw-auth/src/main/resources/bootstrap.yml

@@ -11,4 +11,10 @@ spring:
 
 logging:
   level:
-    root: info
+    root: info
+
+#直接放行的请求链接
+links: /auth/login,/kwsUser/resetPassword,/kwsUser/updatePassword,/kwsUser/forgetPassword
+
+#是否允许一个账号绑定多个角色
+isBindManyRole:

+ 1 - 0
sckw-common/pom.xml

@@ -23,6 +23,7 @@
         <module>sckw-common-datasource</module>
         <module>sckw-common-sentinel</module>
         <module>sckw-common-seata</module>
+        <module>sckw-common-startup</module>
     </modules>
 
     <properties>

+ 6 - 0
sckw-common/sckw-common-bom/pom.xml

@@ -13,6 +13,12 @@
     <dependencyManagement>
         <dependencies>
             <!-- 核心模块 -->
+            <dependency>
+                <groupId>com.sckw</groupId>
+                <artifactId>sckw-common-startup</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>com.sckw</groupId>
                 <artifactId>sckw-common-core</artifactId>

+ 1 - 6
sckw-common/sckw-common-remote/src/main/java/com/sckw/remote/annotation/SckwCloudApplication.java → sckw-common/sckw-common-remote/src/main/java/com/sckw/remote/annotation/SckwRemoteApplication.java

@@ -1,10 +1,7 @@
 package com.sckw.remote.annotation;
 
 import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
-
 import java.lang.annotation.*;
 
 @Target({ElementType.TYPE})
@@ -13,7 +10,5 @@ import java.lang.annotation.*;
 @Inherited
 @EnableDubbo
 @EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
-@SpringBootApplication
-public @interface SckwCloudApplication {
+public @interface SckwRemoteApplication {
 }

+ 60 - 0
sckw-common/sckw-common-startup/pom.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>sckw-common</artifactId>
+        <groupId>com.sckw</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>sckw-common-startup</artifactId>
+    <description>spring boot服务启动依赖</description>
+
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <!--web-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-autoconfigure</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-loadbalancer</artifactId>
+        </dependency>
+
+        <!--注册中心客户端-->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+
+        <!--配置中心客户端-->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 15 - 0
sckw-common/sckw-common-startup/src/main/java/com/sckw/startup/annotation/SckwCloudApplication.java

@@ -0,0 +1,15 @@
+package com.sckw.startup.annotation;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+@EnableDiscoveryClient
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
+public @interface SckwCloudApplication {
+}

+ 5 - 39
sckw-modules/sckw-file/pom.xml

@@ -18,6 +18,11 @@
 
     <dependencies>
         <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -64,45 +69,6 @@
             <artifactId>sckw-common-sentinel</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
         <!--alibaba oss-->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>

+ 5 - 14
sckw-modules/sckw-file/src/main/java/com/sckw/file/FileApplication.java

@@ -1,30 +1,21 @@
 package com.sckw.file;
 
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @author lfdc
- * @version 1.0
- * @className FileApplication
- * @description 文件上传下载启动类
- * @company sckw
+ * @desc 文件上传下载启动类
  * @date 2023-06-02 17:06:43
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
 @EnableAutoDataSourceProxy
-@SpringBootApplication
+@SckwRemoteApplication
+@SckwCloudApplication
 public class FileApplication {
 
     public static void main(String[] args) {
-        // 关闭nacos日志
-        System.setProperty("nacos.logging.default.config.enabled", "false");
         SpringApplication.run(FileApplication.class, args);
     }
 }

+ 0 - 1
sckw-modules/sckw-file/src/main/resources/bootstrap-dev.yml

@@ -135,7 +135,6 @@ dubbo:
     #use-as-config-center: false
     #use-as-metadata-center: false
 
-links:
 aliyun:
   oss:
     endpoint: oss-cn-chengdu.aliyuncs.com

+ 7 - 1
sckw-modules/sckw-file/src/main/resources/bootstrap.yml

@@ -7,4 +7,10 @@ spring:
   profiles:
     active: ${DEPLOY_MODE:dev}
   main:
-    allow-bean-definition-overriding: true
+    allow-bean-definition-overriding: true
+
+#直接放行的请求链接
+links:
+
+#是否允许一个账号绑定多个角色
+isBindManyRole:

+ 5 - 39
sckw-modules/sckw-message/pom.xml

@@ -18,6 +18,11 @@
 
     <dependencies>
         <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -63,45 +68,6 @@
             <artifactId>sckw-message-api</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
     </dependencies>
 
     <build>

+ 4 - 8
sckw-modules/sckw-message/src/main/java/com/sckw/message/MessageApplication.java

@@ -1,20 +1,16 @@
 package com.sckw.message;
 
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @author admin
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
 @EnableAutoDataSourceProxy
-@SpringBootApplication
+@SckwRemoteApplication
+@SckwCloudApplication
 public class MessageApplication {
 
     public static void main(String[] args) {

+ 3 - 0
sckw-modules/sckw-message/src/main/resources/bootstrap.yml

@@ -9,5 +9,8 @@ spring:
   main:
     allow-bean-definition-overriding: true
 
+#直接放行的请求链接
 links:
+
+#是否允许一个账号绑定多个角色
 isBindManyRole:

+ 5 - 30
sckw-modules/sckw-order/pom.xml

@@ -18,6 +18,11 @@
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -57,36 +62,6 @@
             <artifactId>sckw-system-api</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
     </dependencies>
 
     <build>

+ 4 - 9
sckw-modules/sckw-order/src/main/java/com/sckw/order/OrderApplication.java

@@ -1,23 +1,18 @@
 package com.sckw.order;
 
-
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @desc: 订单服务
  * @author: yzc
  * @date: 2023-06-21 11:46
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
 @EnableAutoDataSourceProxy
-@SpringBootApplication
+@SckwRemoteApplication
+@SckwCloudApplication
 public class OrderApplication {
 
     public static void main(String[] args) {

+ 3 - 0
sckw-modules/sckw-order/src/main/resources/bootstrap.yml

@@ -9,5 +9,8 @@ spring:
   main:
     allow-bean-definition-overriding: true
 
+#直接放行的请求链接
 links:
+
+#是否允许一个账号绑定多个角色
 isBindManyRole:

+ 5 - 30
sckw-modules/sckw-product/pom.xml

@@ -18,6 +18,11 @@
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -58,36 +63,6 @@
             <artifactId>sckw-system-api</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
     </dependencies>
 
     <build>

+ 4 - 10
sckw-modules/sckw-product/src/main/java/com/sckw/product/ProductApplication.java

@@ -1,28 +1,22 @@
 package com.sckw.product;
 
-
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @desc: 产品服务
  * @author: yzc
  * @date: 2023-06-21 11:46
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
 @EnableAutoDataSourceProxy
-@SpringBootApplication
+@SckwRemoteApplication
+@SckwCloudApplication
 public class ProductApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ProductApplication.class, args);
     }
 
-
 }

+ 3 - 0
sckw-modules/sckw-product/src/main/resources/bootstrap.yml

@@ -9,5 +9,8 @@ spring:
   main:
     allow-bean-definition-overriding: true
 
+#直接放行的请求链接
 links:
+
+#是否允许一个账号绑定多个角色
 isBindManyRole:

+ 5 - 39
sckw-modules/sckw-system/pom.xml

@@ -18,6 +18,11 @@
 
     <dependencies>
         <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -58,44 +63,5 @@
             <artifactId>sckw-system-api</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
     </dependencies>
 </project>

+ 10 - 15
sckw-modules/sckw-system/src/main/java/com/sckw/system/SystemApplication.java

@@ -1,25 +1,20 @@
 package com.sckw.system;
 
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
-@SpringBootApplication
+/**
+ * @desc: 系统SaaS基础服务
+ * @author: zk
+ * @date: 22023-05-26 11:46
+ */
+@SckwRemoteApplication
+@SckwCloudApplication
 public class SystemApplication {
 
     public static void main(String[] args) {
-        // 关闭nacos日志
-        System.setProperty("nacos.logging.default.config.enabled", "false");
-        try {
-            SpringApplication.run(SystemApplication.class, args);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+        SpringApplication.run(SystemApplication.class, args);
     }
 
 }

+ 0 - 2
sckw-modules/sckw-system/src/main/resources/bootstrap-dev.yml

@@ -122,5 +122,3 @@ dubbo:
     protocol: nacos
     #use-as-config-center: false
     #use-as-metadata-center: false
-
-links:

+ 7 - 1
sckw-modules/sckw-system/src/main/resources/bootstrap.yml

@@ -7,4 +7,10 @@ spring:
   profiles:
     active: ${DEPLOY_MODE:dev}
   main:
-    allow-bean-definition-overriding: true
+    allow-bean-definition-overriding: true
+
+#直接放行的请求链接
+links:
+
+#是否允许一个账号绑定多个角色
+isBindManyRole:

+ 5 - 55
sckw-modules/sckw-transport/pom.xml

@@ -19,6 +19,11 @@
 
     <dependencies>
         <!-- 核心模块 -->
+        <dependency>
+            <groupId>com.sckw</groupId>
+            <artifactId>sckw-common-startup</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>com.sckw</groupId>
             <artifactId>sckw-common-core</artifactId>
@@ -59,61 +64,6 @@
             <artifactId>sckw-common-sentinel</artifactId>
         </dependency>
 
-        <!--web-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-bootstrap</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-loadbalancer</artifactId>
-        </dependency>
-
-        <!--注册中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!--配置中心客户端-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
-        <!--alibaba oss-->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alicloud-oss</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.sckw</groupId>
-            <artifactId>sckw-common-core</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-
         <!-- validation -->
         <dependency>
             <groupId>org.springframework.boot</groupId>

+ 5 - 9
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/TransPortApplication.java

@@ -1,22 +1,18 @@
 package com.sckw.transport;
 
+import com.sckw.remote.annotation.SckwRemoteApplication;
+import com.sckw.startup.annotation.SckwCloudApplication;
 import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @author lfdc
- * @description 运输服务启动类
+ * @desc 运输服务启动类
  * @date 2023-06-26 16:00:26
  */
-@EnableDubbo
-@EnableFeignClients({"com.sckw.*.api.feign"})
-@EnableDiscoveryClient
 @EnableAutoDataSourceProxy
-@SpringBootApplication
+@SckwRemoteApplication
+@SckwCloudApplication
 public class TransPortApplication {
     public static void main(String[] args) {
         SpringApplication.run(TransPortApplication.class, args);

+ 0 - 2
sckw-modules/sckw-transport/src/main/resources/bootstrap-dev.yml

@@ -134,5 +134,3 @@ dubbo:
     protocol: nacos
     #use-as-config-center: false
     #use-as-metadata-center: false
-
-links:

+ 7 - 1
sckw-modules/sckw-transport/src/main/resources/bootstrap.yml

@@ -7,4 +7,10 @@ spring:
   profiles:
     active: ${DEPLOY_MODE:dev}
   main:
-    allow-bean-definition-overriding: true
+    allow-bean-definition-overriding: true
+
+#直接放行的请求链接
+links:
+
+#是否允许一个账号绑定多个角色
+isBindManyRole: