Skip to content

Commit

Permalink
Add bean aliases linkGenerator, grailsLinkGenerator for `LinkGene…
Browse files Browse the repository at this point in the history
…rator`

Closes gh-25
  • Loading branch information
rainboyan committed Dec 18, 2024
1 parent 183e820 commit 63497ec
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import grails.web.mapping.UrlMappingsHolder;
import org.grails.config.NavigableMap;
import org.grails.plugins.BinaryGrailsPlugin;
import org.grails.web.mapping.DefaultLinkGenerator;

/**
* {@link EnableAutoConfiguration Auto-configuration} for Asset Pipeline
Expand All @@ -66,10 +65,10 @@ public class AssetPipelineAutoConfiguration {

private static final Logger logger = LoggerFactory.getLogger(AssetPipelineAutoConfiguration.class);

@Bean
@Order(-20)
@ConditionalOnMissingBean(grails.web.mapping.LinkGenerator.class)
public DefaultLinkGenerator assetLinkGenerator(ObjectProvider<GrailsApplication> grailsApplication,
@Bean({"linkGenerator", "grailsLinkGenerator", "assetLinkGenerator"})
@ConditionalOnMissingBean
public grails.web.mapping.LinkGenerator assetLinkGenerator(ObjectProvider<GrailsApplication> grailsApplication,
ObjectProvider<UrlMappingsHolder> grailsUrlMappingsHolder, ObjectProvider<AssetProcessorService> assetProcessorService) {
Config config = grailsApplication.getObject().getConfig();
boolean isReloadEnabled = Environment.isDevelopmentMode() || Environment.getCurrent().isReloadEnabled();
Expand Down

0 comments on commit 63497ec

Please sign in to comment.