@@ -9,7 +9,6 @@ import grails.util.BuildSettings
99import grails.util.Environment
1010import groovy.transform.CompileDynamic
1111import groovy.transform.CompileStatic
12- import groovy.transform.InheritConstructors
1312import groovy.util.logging.Slf4j
1413import org.codehaus.groovy.control.CompilationFailedException
1514import org.codehaus.groovy.control.CompilationUnit
@@ -22,9 +21,11 @@ import org.grails.io.watch.DirectoryWatcher
2221import org.grails.io.watch.FileExtensionFileChangeListener
2322import org.grails.plugins.BinaryGrailsPlugin
2423import org.grails.plugins.support.WatchPattern
24+ import org.springframework.boot.Banner
2525import org.springframework.boot.SpringApplication
2626import org.springframework.context.ConfigurableApplicationContext
2727import org.springframework.core.env.ConfigurableEnvironment
28+ import org.springframework.core.io.ResourceLoader
2829
2930import java.util.concurrent.ConcurrentLinkedQueue
3031
@@ -36,7 +37,6 @@ import java.util.concurrent.ConcurrentLinkedQueue
3637 * @since 3.0
3738 */
3839@CompileStatic
39- @InheritConstructors
4040@Slf4j
4141class GrailsApp extends SpringApplication {
4242
@@ -45,6 +45,35 @@ class GrailsApp extends SpringApplication {
4545
4646 boolean enableBeanCreationProfiler = false
4747
48+ /**
49+ * Create a new {@link GrailsApp} instance. The application context will load
50+ * beans from the specified sources (see {@link SpringApplication class-level }
51+ * documentation for details. The instance can be customized before calling
52+ * {@link #run(String...)}.
53+ * @param sources the bean sources
54+ * @see #run(Object, String[])
55+ * @see #GrailsApp(org.springframework.core.io.ResourceLoader, Object...)
56+ */
57+ public GrailsApp (Object ... sources ) {
58+ super (sources)
59+ bannerMode = Banner.Mode . OFF
60+ }
61+
62+ /**
63+ * Create a new {@link GrailsApp} instance. The application context will load
64+ * beans from the specified sources (see {@link SpringApplication class-level }
65+ * documentation for details. The instance can be customized before calling
66+ * {@link #run(String...)}.
67+ * @param resourceLoader the resource loader to use
68+ * @param sources the bean sources
69+ * @see #run(Object, String[])
70+ * @see #GrailsApp(org.springframework.core.io.ResourceLoader, Object...)
71+ */
72+ public GrailsApp (ResourceLoader resourceLoader , Object ... sources ) {
73+ super (resourceLoader, sources)
74+ bannerMode = Banner.Mode . OFF
75+ }
76+
4877 @Override
4978 ConfigurableApplicationContext run (String ... args ) {
5079 def applicationContext = super . run(args)
@@ -330,11 +359,6 @@ class GrailsApp extends SpringApplication {
330359 }
331360 }
332361
333- @Override
334- protected void printBanner (org.springframework.core.env.Environment environment ) {
335- // noop
336- }
337-
338362 /**
339363 * Static helper that can be used to run a {@link GrailsApp} from the
340364 * specified source using default settings.
0 commit comments