Skip to content

Commit

Permalink
Remove unneeded grailsLinkGenerator already created by grails-plugin-…
Browse files Browse the repository at this point in the history
…url-mappings (#362)
  • Loading branch information
codeconsole authored Dec 10, 2024
1 parent 5a7b347 commit ffe8406
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
*/
package asset.pipeline

import asset.pipeline.AssetPipelineFilter
import asset.pipeline.grails.AssetProcessorService
import asset.pipeline.grails.LinkGenerator
import asset.pipeline.grails.CachingLinkGenerator
import asset.pipeline.grails.AssetResourceLocator
import asset.pipeline.grails.fs.*
import asset.pipeline.fs.*
Expand Down Expand Up @@ -111,14 +108,7 @@ class AssetPipelineGrailsPlugin extends grails.plugins.Plugin {
if (BuildSettings.TARGET_DIR) {
AssetPipelineConfigHolder.config.cacheLocation = new File((File) BuildSettings.TARGET_DIR, ".assetcache").canonicalPath
}
// Register Link Generator
String serverURL = config?.getProperty('grails.serverURL', String, null)
boolean cacheUrls = config?.getProperty('grails.web.linkGenerator.useCache', Boolean, true)

assetProcessorService(AssetProcessorService)
grailsLinkGenerator(cacheUrls ? CachingLinkGenerator : LinkGenerator, serverURL) { bean ->
bean.autowire = true
}

assetResourceLocator(AssetResourceLocator) { bean ->
bean.parent = "abstractGrailsResourceLocator"
Expand Down

0 comments on commit ffe8406

Please sign in to comment.