Skip to content

Commit 01ae2da

Browse files
authored
Merge pull request #146 from mercyblitz/dev-1.x
Update Maven parent POM and module versions to latest releases
2 parents 8293d0c + 298ba73 commit 01ae2da

12 files changed

Lines changed: 82 additions & 53 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ Choose the version that matches your Spring Boot generation:
110110

111111
| Branch | Spring Boot Compatibility | Latest Version |
112112
|--------|------------------------------|----------------|
113-
| `main` | 3.0.x – 3.5.x, 4.0.x - 4.1.x | `0.2.29` |
114-
| `1.x` | 2.0.x – 2.7.x | `0.1.29` |
113+
| `main` | 3.0.x – 3.5.x, 4.0.x - 4.1.x | `0.2.30` |
114+
| `1.x` | 2.0.x – 2.7.x | `0.1.30` |
115115

116116
### Add Module Dependencies
117117

microsphere-spring-boot-actuator/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,21 @@
6565
<scope>test</scope>
6666
</dependency>
6767

68+
<!-- Spring Boot Test -->
6869
<dependency>
6970
<groupId>org.springframework.boot</groupId>
7071
<artifactId>spring-boot-starter-test</artifactId>
7172
<scope>test</scope>
7273
</dependency>
7374

75+
<!-- Microsphere Spring Boot Test -->
76+
<dependency>
77+
<groupId>io.github.microsphere-projects</groupId>
78+
<artifactId>microsphere-spring-boot-test</artifactId>
79+
<version>${revision}</version>
80+
<scope>test</scope>
81+
</dependency>
82+
7483
</dependencies>
7584

7685
<profiles>

microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorEndpointsAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package io.microsphere.spring.boot.actuate.autoconfigure;
1818

19+
import io.microsphere.spring.boot.actuate.condition.ConditionalOnActuatorEndpointPresent;
1920
import io.microsphere.spring.boot.actuate.condition.ConditionalOnConfigurationProcessorPresent;
2021
import io.microsphere.spring.boot.actuate.endpoint.ArtifactsEndpoint;
2122
import io.microsphere.spring.boot.actuate.endpoint.ConfigurationMetadataEndpoint;
@@ -40,9 +41,7 @@
4041
* @see Endpoint
4142
* @since 1.0.0
4243
*/
43-
@ConditionalOnClass(name = {
44-
"org.springframework.boot.actuate.endpoint.annotation.Endpoint"
45-
})
44+
@ConditionalOnActuatorEndpointPresent
4645
@Import(value = {ActuatorEndpointsAutoConfiguration.ConfigurationProcessorConfiguration.class})
4746
public class ActuatorEndpointsAutoConfiguration implements BeanClassLoaderAware {
4847

microsphere-spring-boot-core/pom.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@
1818
<description>Microsphere Spring Boot Core</description>
1919

2020
<dependencies>
21-
<!-- Microsphere Java -->
21+
22+
<!-- Microsphere Annotation Processor -->
2223
<dependency>
2324
<groupId>io.github.microsphere-projects</groupId>
24-
<artifactId>microsphere-java-core</artifactId>
25+
<artifactId>microsphere-annotation-processor</artifactId>
26+
<optional>true</optional>
2527
</dependency>
2628

29+
<!-- Microsphere Java -->
2730
<dependency>
2831
<groupId>io.github.microsphere-projects</groupId>
29-
<artifactId>microsphere-annotation-processor</artifactId>
30-
<optional>true</optional>
32+
<artifactId>microsphere-java-core</artifactId>
3133
</dependency>
3234

35+
<!-- Microsphere Spring Context -->
3336
<dependency>
3437
<groupId>io.github.microsphere-projects</groupId>
3538
<artifactId>microsphere-spring-context</artifactId>
@@ -55,16 +58,18 @@
5558
<scope>test</scope>
5659
</dependency>
5760

61+
<!-- Spring Boot Test -->
5862
<dependency>
5963
<groupId>org.springframework.boot</groupId>
6064
<artifactId>spring-boot-starter-test</artifactId>
6165
<scope>test</scope>
6266
</dependency>
6367

64-
<!-- Microsphere Spring Test -->
68+
<!-- Microsphere Spring Boot Test -->
6569
<dependency>
6670
<groupId>io.github.microsphere-projects</groupId>
67-
<artifactId>microsphere-spring-test</artifactId>
71+
<artifactId>microsphere-spring-boot-test</artifactId>
72+
<version>${revision}</version>
6873
<scope>test</scope>
6974
</dependency>
7075

microsphere-spring-boot-core/src/main/java/io/microsphere/spring/boot/context/autoconfigure/ConfigurationPropertiesAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
* @since 1.0.0
3434
*/
3535
@ConditionalOnClass(name = {
36-
"io.microsphere.spring.context.annotation.BeanCapableImportCandidate"
36+
"io.microsphere.spring.context.annotation.BeanCapableImportCandidate" // Microsphere Spring Context API
3737
})
3838
@AutoConfigureBefore(name = {
39-
"org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration"
39+
"org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration" // Spring Boot API
4040
})
4141
@EnableConfigurationPropertiesExtension
4242
public class ConfigurationPropertiesAutoConfiguration {

microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/context/autoconfigure/ConfigurationPropertiesAutoConfigurationTest.java

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@
2222
import io.microsphere.spring.boot.context.properties.TestConfigurationPropertiesBindHandlerAdvisor;
2323
import io.microsphere.spring.boot.context.properties.bind.EventPublishingConfigurationPropertiesBeanPropertyChangedListener;
2424
import io.microsphere.spring.boot.context.properties.bind.TestBindListener;
25-
import org.junit.jupiter.api.Test;
26-
import org.springframework.beans.factory.annotation.Autowired;
27-
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
28-
import org.springframework.context.ConfigurableApplicationContext;
29-
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
25+
import io.microsphere.spring.boot.test.AutoConfigurationTest;
26+
import io.microsphere.spring.context.annotation.BeanCapableImportCandidate;
27+
import org.springframework.boot.test.context.SpringBootTest;
3028

31-
import static io.microsphere.spring.beans.BeanUtils.isBeanPresent;
32-
import static org.junit.jupiter.api.Assertions.assertTrue;
29+
import java.util.Set;
30+
31+
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.NONE;
3332

3433
/**
3534
* {@link ConfigurationPropertiesAutoConfiguration} Test
@@ -38,18 +37,26 @@
3837
* @see ConfigurationPropertiesAutoConfiguration
3938
* @since 1.0.0
4039
*/
41-
@SpringJUnitConfig
42-
@EnableAutoConfiguration
43-
class ConfigurationPropertiesAutoConfigurationTest {
44-
45-
@Autowired
46-
private ConfigurableApplicationContext context;
47-
48-
@Test
49-
void test() {
50-
assertTrue(isBeanPresent(this.context, ListenableConfigurationPropertiesBindHandlerAdvisor.class));
51-
assertTrue(isBeanPresent(this.context, EventPublishingConfigurationPropertiesBeanPropertyChangedListener.class));
52-
assertTrue(isBeanPresent(this.context, TestBindListener.class));
53-
assertTrue(isBeanPresent(this.context, TestConfigurationPropertiesBindHandlerAdvisor.class));
40+
@SpringBootTest(
41+
classes = ConfigurationPropertiesAutoConfigurationTest.class,
42+
webEnvironment = NONE
43+
)
44+
class ConfigurationPropertiesAutoConfigurationTest extends AutoConfigurationTest<ConfigurationPropertiesAutoConfiguration> {
45+
46+
@Override
47+
protected void configureAutoConfiguredClasses(Set<Class<?>> autoConfiguredClasses) {
48+
autoConfiguredClasses.add(ListenableConfigurationPropertiesBindHandlerAdvisor.class);
49+
autoConfiguredClasses.add(EventPublishingConfigurationPropertiesBeanPropertyChangedListener.class);
50+
autoConfiguredClasses.add(TestBindListener.class);
51+
autoConfiguredClasses.add(TestConfigurationPropertiesBindHandlerAdvisor.class);
52+
}
53+
54+
@Override
55+
protected void configureGlobalDisabledPropertyValues(Set<String> globalDisabledPropertyValues) {
56+
}
57+
58+
@Override
59+
protected void configureGlobalMissingClasses(Set<Class<?>> globalMissingClasses) {
60+
globalMissingClasses.add(BeanCapableImportCandidate.class);
5461
}
5562
}

microsphere-spring-boot-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<description>Microsphere Spring Boot Parent</description>
2020

2121
<properties>
22-
<microsphere-spring.version>0.1.33</microsphere-spring.version>
22+
<microsphere-spring.version>0.1.35</microsphere-spring.version>
2323
<jolokia.version>1.7.2</jolokia.version>
2424
<!-- Testing -->
2525
<junit-jupiter.version>5.14.4</junit-jupiter.version>

microsphere-spring-boot-webflux/pom.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020

2121
<dependencies>
2222

23-
<!-- Microsphere Spring Boot -->
23+
<!-- Microsphere Annotation Processor -->
2424
<dependency>
2525
<groupId>io.github.microsphere-projects</groupId>
26-
<artifactId>microsphere-spring-boot-core</artifactId>
27-
<version>${revision}</version>
26+
<artifactId>microsphere-annotation-processor</artifactId>
27+
<optional>true</optional>
2828
</dependency>
2929

30-
<!-- Microsphere Annotation Processor -->
30+
<!-- Microsphere Spring Boot -->
3131
<dependency>
3232
<groupId>io.github.microsphere-projects</groupId>
33-
<artifactId>microsphere-annotation-processor</artifactId>
34-
<optional>true</optional>
33+
<artifactId>microsphere-spring-boot-core</artifactId>
34+
<version>${revision}</version>
3535
</dependency>
3636

3737
<!-- Microsphere Spring WebFlux -->
@@ -67,10 +67,11 @@
6767
<scope>test</scope>
6868
</dependency>
6969

70-
<!-- Microsphere Spring Test -->
70+
<!-- Microsphere Spring Boot Test -->
7171
<dependency>
7272
<groupId>io.github.microsphere-projects</groupId>
73-
<artifactId>microsphere-spring-test</artifactId>
73+
<artifactId>microsphere-spring-boot-test</artifactId>
74+
<version>${revision}</version>
7475
<scope>test</scope>
7576
</dependency>
7677

microsphere-spring-boot-webflux/src/main/java/io/microsphere/spring/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
@ConditionalOnWebFluxAvailable
3232
@AutoConfigureAfter(name = {
33-
"org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration"
33+
"org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration" // Spring Boot API
3434
})
3535
@EnableWebFluxExtension(reversedProxyHandlerMapping = true)
3636
public class WebFluxAutoConfiguration {

microsphere-spring-boot-webmvc/pom.xml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020

2121
<dependencies>
2222

23-
<!-- Microsphere Spring Boot -->
23+
<!-- Microsphere Annotation Processor -->
2424
<dependency>
2525
<groupId>io.github.microsphere-projects</groupId>
26-
<artifactId>microsphere-spring-boot-core</artifactId>
27-
<version>${revision}</version>
26+
<artifactId>microsphere-annotation-processor</artifactId>
27+
<optional>true</optional>
2828
</dependency>
2929

30-
<!-- Microsphere Annotation Processor -->
30+
<!-- Microsphere Spring Boot -->
3131
<dependency>
3232
<groupId>io.github.microsphere-projects</groupId>
33-
<artifactId>microsphere-annotation-processor</artifactId>
34-
<optional>true</optional>
33+
<artifactId>microsphere-spring-boot-core</artifactId>
34+
<version>${revision}</version>
3535
</dependency>
3636

3737
<!-- Microsphere Spring Web MVC -->
@@ -79,10 +79,18 @@
7979
<scope>test</scope>
8080
</dependency>
8181

82-
<!-- Microsphere Spring Test -->
82+
<!-- Microsphere Spring Boot Test -->
8383
<dependency>
8484
<groupId>io.github.microsphere-projects</groupId>
85-
<artifactId>microsphere-spring-test</artifactId>
85+
<artifactId>microsphere-spring-boot-test</artifactId>
86+
<version>${revision}</version>
87+
<scope>test</scope>
88+
</dependency>
89+
90+
<!-- Jackson -->
91+
<dependency>
92+
<groupId>com.fasterxml.jackson.core</groupId>
93+
<artifactId>jackson-databind</artifactId>
8694
<scope>test</scope>
8795
</dependency>
8896

0 commit comments

Comments
 (0)