Skip to content

Commit

Permalink
Use 'proxyBeanMethods = false' where possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Oct 28, 2019
1 parent 9022b25 commit 97682a3
Show file tree
Hide file tree
Showing 28 changed files with 49 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
public class JoinfacesAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* @author Marcelo Fernandes
*/
@Slf4j
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(AdminfacesProperties.class)
@ComponentScan({"com.github.adminfaces.template.bean",
"com.github.adminfaces.template.config",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(AngularfacesProperties.class)
@ConditionalOnClass(ELTools.class)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* Spring Boot Auto Configuration of BootsFaces.
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(BootsfacesProperties.class)
@ConditionalOnClass(C.class)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(ButterfacesProperties.class)
@ConditionalOnClass(ReflectionUtil.class)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
Expand All @@ -52,7 +52,7 @@ public class ButterfacesAutoConfiguration {
* @author Lars Grefer
* @see <a href="https://github.com/ButterFaces/bootsfaces-integration/blob/6e9d45978590fa72361cf3c98bec77d863f02aea/README.md">ButterFaces/bootsfaces-integration</a>
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(C.class)
@AutoConfigureBefore(BootsfacesAutoConfiguration.class)
public static class ButterfacesBootsfacesAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass({EnvUtils.class, WindowScopeManager.class})
@EnableConfigurationProperties(IcefacesProperties.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(FacesServlet.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@EnableConfigurationProperties(FacesServletProperties.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,31 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(FacesContext.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class JavaxFacesAutoConfiguration {

/**
* Auto configuration for JSF 2.0.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(JavaxFaces2_0Properties.class)
public static class JavaxFaces2_0AutoConfiguration {
}

/**
* Auto configuration for JSF 2.1.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(JavaxFaces2_1Properties.class)
public static class JavaxFaces2_1AutoConfiguration {
}

/**
* Auto configuration for JSF 2.2.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(JavaxFaces2_2Properties.class)
@ConditionalOnClass(FlowHandler.class)
public static class JavaxFaces2_2AutoConfiguration {
Expand All @@ -71,7 +71,7 @@ public static class JavaxFaces2_2AutoConfiguration {
/**
* Auto configuration for JSF 2.3.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(JavaxFaces2_3Properties.class)
@ConditionalOnClass(PushContext.class)
public static class JavaxFaces2_3AutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @author Lars Grefer
* @see <a href="http://arjan-tijms.omnifaces.org/p/jsf-23.html#1316">http://arjan-tijms.omnifaces.org/p/jsf-23.html#1316</a>
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass(FacesContext.class)
public class JsfBeansAutoConfiguration {
Expand Down Expand Up @@ -187,7 +187,7 @@ public ExternalContext externalContext() {
return FacesContext.getCurrentInstance().getExternalContext();
}

@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(ApplicationMap.class)
public static class Jsf2_3AutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class MessageSourceBridgeAutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* Auto configuration of JSF {@link ProjectStage}.
*
* @author Lars Grefer
*/
@Slf4j
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(ProjectStage.class)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* @author Marcelo Fernandes
*/
@Slf4j
@Configuration
@Configuration(proxyBeanMethods = false)
@RequiredArgsConstructor
@EnableConfigurationProperties(JettyProperties.class)
@ConditionalOnClass(Server.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @author Lars Grefer
* @see org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass(name = {
"javax.persistence.EntityManager",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(MojarraProperties.class)
@ConditionalOnClass(FacesInitializer.class)
@AutoConfigureBefore(WebMvcAutoConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties({MyfacesProperties.class, MyFaces2_3Properties.class})
@ConditionalOnClass(MyFacesContainerInitializer.class)
@AutoConfigureBefore(WebMvcAutoConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(FacesViews.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@EnableConfigurationProperties(OmnifacesProperties.class)
Expand All @@ -49,7 +49,7 @@ public class OmnifacesAutoConfiguration {
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "org.omnifaces.facesviews.FacesViewsInitializer")
public static class Omnifaces1AutoConfiguration {

Expand All @@ -67,7 +67,7 @@ public ServletContainerInitializerRegistrationBean<?> omnifacesServletContainerI
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "org.omnifaces.ApplicationInitializer")
public static class Omnifaces2AutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Marcelo Fernandes
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Constants.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
Expand All @@ -56,7 +56,7 @@ public PrimeFaces primefaces() {
/**
* Auto Configuration for Primefaces 4.0.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces4_0Properties.class)
@ConditionalOnClass(Captcha.class)
public static class Primefaces4_0AutoConfiguration {
Expand All @@ -65,7 +65,7 @@ public static class Primefaces4_0AutoConfiguration {
/**
* Auto Configuration for Primefaces 5.0.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces5_0Properties.class)
@ConditionalOnClass(CacheProvider.class)
public static class Primefaces5_0AutoConfiguration {
Expand All @@ -74,31 +74,31 @@ public static class Primefaces5_0AutoConfiguration {
/**
* Auto Configuration for Primefaces 5.1.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces5_1Properties.class)
public static class Primefaces5_1AutoConfiguration {
}

/**
* Auto Configuration for Primefaces 5.2+.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces5_2Properties.class)
public static class Primefaces5_2AutoConfiguration {
}

/**
* Auto Configuration for Primefaces 6.0.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces6_0Properties.class)
public static class Primefaces6_0AutoConfiguration {
}

/**
* Auto Configuration for Primefaces 6.2+.
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(Primefaces6_2Properties.class)
public static class Primefaces6_2AutoConfiguration {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*
* @author Nurettin Yilmaz
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(MultipartRequest.class)
@AutoConfigureAfter(JavaxFacesAutoConfiguration.class)
public class PrimefacesFileUploadServletContextAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener;
import org.ocpsoft.rewrite.spring.SpringExpressionLanguageProvider;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
Expand All @@ -41,16 +40,13 @@
* @author Marcelo Fernandes
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties({RewriteProperties.class, RewriteFilterProperties.class})
@ConditionalOnClass(RewriteFilter.class)
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class RewriteAutoConfiguration {

@Autowired
private RewriteProperties rewriteProperties;

/**
* This {@link WebFragmentRegistrationBean} is equivalent to the
* {@code META-INF/web-fragment.xml} of the {@code rewrite-servlet.jar}.
Expand Down Expand Up @@ -106,10 +102,11 @@ public SpringBootBeanNameResolver rewriteBeanNameResolver(ApplicationContext app
* {@link org.ocpsoft.rewrite.servlet.config.HttpConfigurationProvider} which scans for Rewrite annotations within
* the classpath.
*
* @param rewriteProperties The {@link org.springframework.boot.context.properties.ConfigurationProperties} for Rewrite.
* @return rewrite annotation scanner
*/
@Bean
public SpringBootAnnotationConfigProvider rewriteAnnotationConfigProvider() {
return new SpringBootAnnotationConfigProvider(this.rewriteProperties.getAnnotationConfigProvider());
public SpringBootAnnotationConfigProvider rewriteAnnotationConfigProvider(RewriteProperties rewriteProperties) {
return new SpringBootAnnotationConfigProvider(rewriteProperties.getAnnotationConfigProvider());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @author Jamillo Santos
* @author Renato Soares
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(RichfacesProperties.class)
@ConditionalOnClass(CoreConfiguration.class)
@AutoConfigureBefore(JavaxFacesAutoConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @author Diego Diez
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RequestScoped.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class CdiScopeAnnotationsAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @author Diego Diez
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RequestScoped.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class JsfScopeAnnotationsAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication
public class ServletContextInitParameterPropertiesAutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @author Lars Grefer
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(TobagoServletContextListener.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class TobagoAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @author Marcelo Fernandes
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Context.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class TomcatAutoConfiguration {
Expand Down
Loading

0 comments on commit 97682a3

Please sign in to comment.