Skip to content

Commit

Permalink
#44 import WebProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
hank-cp committed Nov 21, 2023
1 parent 4ddd735 commit f569e5a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ http_port=8080

sbpVersion=22

springBootVersion=3.1.1
springBootVersion=3.1.4
#springBootVersion=3.1.1
lombokVersion=1.18.26
pf4jVersion=3.8.0
jooqVersion=3.17.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ protected boolean importBean(GenericApplicationContext sourceApplicationContext,
Class<?> beanClass) {
try {
Map<String, ?> beans = sourceApplicationContext.getBeansOfType(beanClass);
if (beans.size() == 0) {
if (beans.isEmpty()) {
return false;
}
for (String beanName : beans.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.autoconfigure.web.reactive.PluginWebFluxResourceHandlerRegistrationCustomizer;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxRegistrations;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping;
Expand All @@ -40,6 +43,7 @@
@ConditionalOnProperty(prefix = SbpProperties.PREFIX, value = {"enabled"}, havingValue = "true")
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
@AutoConfigureBefore({ WebFluxAutoConfiguration.class })
@EnableConfigurationProperties({WebProperties.class, WebFluxProperties.class})
public class SbpWebFluxPatchAutoConfiguration {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.autoconfigure.web.reactive.WebFluxRegistrations;
import org.springframework.boot.autoconfigure.web.servlet.PluginResourceHandlerRegistrationCustomizer;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
Expand All @@ -42,7 +44,7 @@
@ConditionalOnClass({ PluginManager.class, SpringBootPluginManager.class })
@ConditionalOnProperty(prefix = SbpProperties.PREFIX, value = "enabled", havingValue = "true")
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)

@EnableConfigurationProperties(WebProperties.class)
public class SbpWebMvcPatchAutoConfiguration {

@Bean
Expand Down

0 comments on commit f569e5a

Please sign in to comment.