import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Primary;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
@Configuration
return new DefaultRuleController(userSession, ruleService, ruleRestResponseGenerator);
}
- @Bean
+ @Primary
+ @Bean("org.sonar.server.v2.config.PlatformLevel4WebConfig.requestMappingHandlerMapping")
public RequestMappingHandlerMapping requestMappingHandlerMapping(UserSession userSession) {
RequestMappingHandlerMapping handlerMapping = new RequestMappingHandlerMapping();
handlerMapping.setInterceptors(new DeprecatedHandler(userSession));
import org.sonar.server.platform.platformlevel.PlatformLevel;
import org.sonar.server.v2.config.PlatformLevel4WebConfig;
import org.sonar.server.v2.config.SafeModeWebConfig;
+import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
private DispatcherServlet initDispatcherServlet(PlatformLevel platformLevel, Class<?> configClass) {
AnnotationConfigWebApplicationContext springMvcContext = new AnnotationConfigWebApplicationContext();
+ springMvcContext.setBeanNameGenerator(FullyQualifiedAnnotationBeanNameGenerator.INSTANCE);
+ springMvcContext.setAllowBeanDefinitionOverriding(false);
springMvcContext.setParent(platformLevel.getContainer().context());
springMvcContext.register(configClass);
if (PlatformLevel4WebConfig.class.equals(configClass)) {
zip {
mustRunAfter cyclonedxBom
doLast {
- def minLength = 340000000
+ def minLength = 342000000
def maxLength = 750000000
def length = archiveFile.get().asFile.length()