Skip to content

Commit

Permalink
Merge pull request grails#13914 from jdaugherty/linkGenerator
Browse files Browse the repository at this point in the history
Allow LinkGenerator to be overridden by autoconfiguration
  • Loading branch information
davydotcom authored Dec 10, 2024
2 parents 7f06648 + 8a54736 commit c356409
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public UrlConverter hyphenatedUrlConverter() {
}

@Bean
@ConditionalOnMissingBean(name = LinkGenerator.BEAN_NAME)
public LinkGenerator grailsLinkGenerator() {
if (cacheUrls == null) {
cacheUrls = !Environment.isDevelopmentMode() && !Environment.getCurrent().isReloadEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/
public interface LinkGenerator {

String BEAN_NAME = "grailsLinkGenerator";
String ATTRIBUTE_CONTROLLER = "controller";
String ATTRIBUTE_RESOURCE = "resource";
String ATTRIBUTE_ACTION = "action";
Expand Down

0 comments on commit c356409

Please sign in to comment.