Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded grailsLinkGenerator already created by grails-plugin-url-mappings #362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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