Add support for multiple non-interactive commmands

Also:
* Rename ThemeResolver bean to avoid clash w/ Spring Boot registered ThemeResolver
* Move shell runner precedence to public static field to allow extension/access
This commit is contained in:
onobc
2022-02-18 13:34:36 -06:00
committed by Janne Valkealahti
parent 7746e571b6
commit 5f447aa831
4 changed files with 85 additions and 34 deletions

View File

@@ -33,12 +33,12 @@ public class ThemingAutoConfiguration {
public ThemeRegistry themeRegistry(ObjectProvider<Theme> themes) {
ThemeRegistry registry = new ThemeRegistry();
registry.register(Theme.of("default", ThemeSettings.themeSettings()));
themes.orderedStream().forEachOrdered(theme -> registry.register(theme));
themes.orderedStream().forEachOrdered(registry::register);
return registry;
}
@Bean
public ThemeResolver themeResolver(ThemeRegistry themeRegistry, SpringShellProperties properties) {
public ThemeResolver shellThemeResolver(ThemeRegistry themeRegistry, SpringShellProperties properties) {
return new ThemeResolver(themeRegistry, properties.getTheme().getName());
}