diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java index 559dc553d6..f0d1ca86f2 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java @@ -81,14 +81,14 @@ import org.springframework.util.StringUtils; * into a Spring Boot enabled application. By default a SSH daemon is started on port * 2000. If the CRaSH Telnet plugin is available on the classpath, Telnet daemon will be * launched on port 5000. - * + * *
* The default shell authentication method uses a username and password combination. If no
* configuration is provided the default username is 'user' and the password will be
* printed to console during application startup. Those default values can be overridden
* by using shell.auth.simple.username and
* shell.auth.simple.password.
- *
+ *
*
* If a Spring Security {@link AuthenticationManager} is detected, this configuration will
* create a {@link CRaSHPlugin} to forward shell authentication requests to Spring
@@ -98,21 +98,21 @@ import org.springframework.util.StringUtils;
* restricted to users having roles that match those configured in
* {@link ManagementServerProperties}. Required roles can be overridden by
* shell.auth.spring.roles.
- *
+ *
*
* To add customizations to the shell simply define beans of type {@link CRaSHPlugin} in * the application context. Those beans will get auto detected during startup and * registered with the underlying shell infrastructure. To configure plugins and the CRaSH * infrastructure add beans of type {@link CrshShellProperties} to the application * context. - * + * *
* Additional shell commands can be implemented using the guide and documentation at crashub.org. By default Boot will search for commands
* using the following classpath scanning pattern classpath*:/commands/**. To
* add different locations or override the default use
* shell.command_path_patterns in your application configuration.
- *
+ *
* @author Christian Dupuis
* @see ShellProperties
*/
@@ -238,8 +238,14 @@ public class CrshAutoConfiguration {
Assert.notNull(filterPatterns, "FilterPatterns must not be null");
FS fileSystem = new FS();
for (String pathPattern : pathPatterns) {
- fileSystem.mount(new SimpleFileSystemDriver(new DirectoryHandle(
- pathPattern, this.resourceLoader, filterPatterns)));
+ try {
+ fileSystem.mount(new SimpleFileSystemDriver(new DirectoryHandle(
+ pathPattern, this.resourceLoader, filterPatterns)));
+ }
+ catch (IOException ex) {
+ throw new IllegalStateException("Failed to mount file system for '"
+ + pathPattern + "'", ex);
+ }
}
return fileSystem;
}
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java
index da9e39a9e4..d5344afce4 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java
@@ -25,7 +25,7 @@ import java.util.UUID;
import org.crsh.auth.AuthenticationPlugin;
import org.crsh.auth.JaasAuthenticationPlugin;
-import org.crsh.lang.groovy.GroovyRepl;
+import org.crsh.lang.impl.groovy.GroovyRepl;
import org.crsh.plugin.PluginContext;
import org.crsh.plugin.PluginLifeCycle;
import org.crsh.plugin.ResourceKind;
@@ -58,7 +58,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link CrshAutoConfiguration}.
- *
+ *
* @author Christian Dupuis
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml
index b1cf30eee3..921a946df2 100644
--- a/spring-boot-dependencies/pom.xml
+++ b/spring-boot-dependencies/pom.xml
@@ -50,13 +50,13 @@