File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
grace-plugin-core/src/main/groovy/org/grails/plugins/core
grace-plugin-gsp/src/main/groovy/org/grails/plugins/web Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 2424import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
2525import org .springframework .context .annotation .Bean ;
2626import org .springframework .context .annotation .Primary ;
27+ import org .springframework .core .Ordered ;
2728import org .springframework .core .annotation .Order ;
2829
2930import grails .config .ConfigProperties ;
3233import grails .core .support .proxy .ProxyHandler ;
3334import grails .util .BuildSettings ;
3435import org .grails .core .io .DefaultResourceLocator ;
36+ import org .grails .core .io .ResourceLocator ;
3537
3638/**
3739 * Core Auto-Configuration.
4143 * @since 4.0
4244 */
4345@ AutoConfiguration
44- @ AutoConfigureOrder (300 )
46+ @ AutoConfigureOrder (Ordered . LOWEST_PRECEDENCE )
4547public class CoreConfiguration {
4648
4749 @ Bean
@@ -59,9 +61,8 @@ public ConfigProperties grailsConfigProperties(ObjectProvider<GrailsApplication>
5961 }
6062
6163 @ Bean
62- @ Order (0 )
6364 @ ConditionalOnMissingBean
64- public DefaultResourceLocator grailsResourceLocator () throws IOException {
65+ public ResourceLocator grailsResourceLocator () throws IOException {
6566 DefaultResourceLocator defaultResourceLocator = new DefaultResourceLocator ();
6667 defaultResourceLocator .setSearchLocations (List .of (BuildSettings .BASE_DIR .getCanonicalPath ()));
6768
Original file line number Diff line number Diff line change 3131import org .springframework .boot .context .properties .EnableConfigurationProperties ;
3232import org .springframework .boot .web .servlet .ServletRegistrationBean ;
3333import org .springframework .context .annotation .Bean ;
34- import org .springframework .context .annotation .Primary ;
3534import org .springframework .core .annotation .Order ;
3635import org .springframework .core .io .DefaultResourceLoader ;
3736import org .springframework .core .io .FileUrlResource ;
@@ -159,8 +158,6 @@ public CachingGrailsConventionGroovyPageLocator groovyPageLocator(GroovyPagesPro
159158 }
160159
161160 @ Bean
162- @ Order (-20 )
163- @ Primary
164161 @ ConditionalOnMissingBean
165162 public ResourceLocator grailsResourceLocator (GroovyPagesProperties groovyPagesProperties , ObjectProvider <GrailsApplication > grailsApplication ) {
166163 Config config = grailsApplication .getIfAvailable ().getConfig ();
You can’t perform that action at this time.
0 commit comments