diff --git a/grace-plugin-url-mappings/src/main/groovy/org/grails/plugins/web/mapping/UrlMappingsPluginConfiguration.java b/grace-plugin-url-mappings/src/main/groovy/org/grails/plugins/web/mapping/UrlMappingsPluginConfiguration.java index 28fd4348f7..630b068aa4 100644 --- a/grace-plugin-url-mappings/src/main/groovy/org/grails/plugins/web/mapping/UrlMappingsPluginConfiguration.java +++ b/grace-plugin-url-mappings/src/main/groovy/org/grails/plugins/web/mapping/UrlMappingsPluginConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * Copyright 2021-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,7 @@ public UrlConverter hyphenatedUrlConverter() { } @Bean + @ConditionalOnMissingBean public UrlMappingsHandlerMapping urlMappingsHandlerMapping(ObjectProvider grailsApplicationProvider, ObjectProvider urlMappingsHolderProvider, GrailsCorsConfiguration grailsCorsConfiguration) { @@ -93,6 +94,7 @@ public UrlMappingsHandlerMapping urlMappingsHandlerMapping(ObjectProvider actionResultTransformerProvider, LinkGenerator grailsLinkGenerator) { @@ -107,6 +109,7 @@ public UrlMappingsInfoHandlerAdapter urlMappingsInfoHandlerAdapter( } @Bean + @ConditionalOnMissingBean public UrlMappingsHolderFactoryBean grailsUrlMappingsHolder( ObjectProvider grailsApplication, ObjectProvider pluginManager, @@ -121,6 +124,7 @@ public UrlMappingsHolderFactoryBean grailsUrlMappingsHolder( } @Bean({"linkGenerator", "grailsLinkGenerator"}) + @ConditionalOnMissingBean public LinkGenerator grailsLinkGenerator(ObjectProvider grailsApplicationProvider, ObjectProvider grailsUrlMappingsHolder) { Config config = grailsApplicationProvider.getIfAvailable().getConfig();