diff --git a/example-main/pom.xml b/example-main/pom.xml
index ed883ccbdac927faec793371a38d1c11aa03fe5c..2cde56df81d60f54e6b8dc181fdf6ea84cf4a77a 100644
--- a/example-main/pom.xml
+++ b/example-main/pom.xml
@@ -16,12 +16,9 @@
1.8
- 3.0.1
-
- 2.5.6
-
3.5.0
2.2
+ 2.0.9
@@ -74,7 +71,7 @@
com.github.xiaoymin
knife4j-spring-boot-starter
- 2.0.7
+ ${knife4j.version}
@@ -98,6 +95,7 @@
spring-boot-starter-aop
+
org.springframework.boot
spring-boot-starter-test
@@ -115,6 +113,7 @@
main
com.gitee.starblues.example.Application
+ jar
diff --git a/example-main/src/main/java/com/gitee/starblues/example/Application.java b/example-main/src/main/java/com/gitee/starblues/example/Application.java
index 9b46a545b3922a1e6d44c2efa549fc98b87d3509..47d27e998ea1d7d8c940259c99f7a7eb2897d4f4 100644
--- a/example-main/src/main/java/com/gitee/starblues/example/Application.java
+++ b/example-main/src/main/java/com/gitee/starblues/example/Application.java
@@ -19,7 +19,7 @@ public class Application implements SpringBootstrap {
}
@Override
- public void run(String[] args) throws Exception {
+ public void run(String[] args) {
SpringApplication.run(Application.class, args);
}
}
diff --git a/example-main/src/main/resources/mapper/MainUserMapper.xml b/example-main/src/main/resources/mapper/AutowiredType.xml
similarity index 100%
rename from example-main/src/main/resources/mapper/MainUserMapper.xml
rename to example-main/src/main/resources/mapper/AutowiredType.xml
diff --git a/example-plugins-basic/example-basic-1/pom.xml b/example-plugins-basic/example-basic-1/pom.xml
index 8d971c6014db5415ece6fd658e6614340eb46ac5..02b3d8d5ff621eee36faf7c7e5570794f1b482c9 100644
--- a/example-plugins-basic/example-basic-1/pom.xml
+++ b/example-plugins-basic/example-basic-1/pom.xml
@@ -15,7 +15,6 @@
-
com.gitee.starblues
spring-brick-maven-packager
@@ -30,7 +29,7 @@
basic1-config.yaml
- jar
+ jar-outer
diff --git a/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/rest/CallerController.java b/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/rest/CallerController.java
index df35f5b203aef9b19348b195ac43eef1eb4ca4c6..df9a8b0edbbcc932b2a502bfd521ef5fd311d708 100644
--- a/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/rest/CallerController.java
+++ b/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/rest/CallerController.java
@@ -3,11 +3,14 @@ package com.gitee.starblues.example.basic1.rest;
import com.gitee.starblues.example.basic1.config.BasicConfig;
import com.gitee.starblues.example.basic1.service.ServiceCaller;
import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
+import javax.sql.DataSource;
+import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -25,8 +28,12 @@ public class CallerController {
@Resource
private ServiceCaller serviceCaller;
+ @Autowired
+ private DataSource dataSource;
+
@GetMapping("/test")
- public BasicConfig caller(){
+ public BasicConfig caller() throws SQLException {
+ System.out.println(dataSource.getConnection().getClientInfo());
String hello = serviceCaller.hello("hello, i am basic");
System.out.println(hello);
return serviceCaller.getConfig("hi, i am basic1");
diff --git a/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/service/BasicService.java b/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/service/BasicService.java
index 23c63fb3b2dde986d166cfd20aed5efd2e29c90c..55690435ce499490db0689ab948df2da0ff8edbc 100644
--- a/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/service/BasicService.java
+++ b/example-plugins-basic/example-basic-1/src/main/java/com/gitee/starblues/example/basic1/service/BasicService.java
@@ -1,6 +1,8 @@
package com.gitee.starblues.example.basic1.service;
+import com.gitee.starblues.bootstrap.annotation.AutowiredType;
import com.gitee.starblues.core.descriptor.PluginDescriptor;
+import com.gitee.starblues.example.service.MainUserService;
import com.gitee.starblues.example.service.TestAnnotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -11,7 +13,6 @@ import org.springframework.stereotype.Service;
* @version 1.0
* @since 2021-08-01
*/
-@Component
@Service
@TestAnnotation
public class BasicService {
@@ -19,7 +20,12 @@ public class BasicService {
@Autowired
private PluginDescriptor pluginDescriptor;
+ @Autowired
+ @AutowiredType(AutowiredType.Type.PLUGIN_MAIN)
+ private MainUserService mainUserService;
+
public String getName(){
+ System.out.println(mainUserService.getById(1));
return BasicService.class.getName();
}
diff --git a/example-plugins-basic/example-basic-2/pom.xml b/example-plugins-basic/example-basic-2/pom.xml
index 5536f26cee7933679e8af7950392dedc98933dae..23d80a5fdb73c3e81db366d8407b3d0ae419ee71 100644
--- a/example-plugins-basic/example-basic-2/pom.xml
+++ b/example-plugins-basic/example-basic-2/pom.xml
@@ -14,7 +14,6 @@
-
com.gitee.starblues
spring-brick-maven-packager
diff --git a/example-plugins-basic/pom.xml b/example-plugins-basic/pom.xml
index 90c68bd6b5846860868e2e37f4c97c99852c72c0..068a1da13294118c1b2f401b0be4991826a4ff90 100644
--- a/example-plugins-basic/pom.xml
+++ b/example-plugins-basic/pom.xml
@@ -18,12 +18,9 @@
example-basic-2
- 1.18.10
+ 1.18.24
4.13
- 2.5.6
- 3.0.1
-
3.1.1
diff --git a/example-plugins-cloud/pom.xml b/example-plugins-cloud/pom.xml
index 5f9de1e254e62a0af0c397c0cb1b615608988ab0..6cf7a4556be11d7d840145b35a87a742c9c7f30d 100644
--- a/example-plugins-cloud/pom.xml
+++ b/example-plugins-cloud/pom.xml
@@ -17,11 +17,10 @@
- 1.18.10
+ 1.18.24
4.13
2.3.12.RELEASE
- 3.0.1
3.1.1
diff --git a/example-plugins-db/example-mybatis-plus/src/main/resources/mapper/MpPluginUserMapper.xml b/example-plugins-db/example-mybatis-plus/src/main/resources/mapper/AutowiredType.xml
similarity index 100%
rename from example-plugins-db/example-mybatis-plus/src/main/resources/mapper/MpPluginUserMapper.xml
rename to example-plugins-db/example-mybatis-plus/src/main/resources/mapper/AutowiredType.xml
diff --git a/example-plugins-db/pom.xml b/example-plugins-db/pom.xml
index 73038bd1689150d28483bc13bf3eb27195aecb4f..7a858733bb9d7085edf32807a5e3aefb1b060a4d 100644
--- a/example-plugins-db/pom.xml
+++ b/example-plugins-db/pom.xml
@@ -18,12 +18,9 @@
example-mybatis-plus
- 1.18.10
+ 1.18.24
4.13
- 3.0.1
- 2.5.6
-
3.1.1
diff --git a/pom.xml b/pom.xml
index 10795272f536e126b9eb2f07f87bb88790601664..37cb55da96f5a2ae391c39fac621eaba343772ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,6 +10,9 @@
1.8
+
+ 3.0.3
+ 2.5.6