类 CrshAutoConfiguration
- java.lang.Object
- org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration
@Configuration @ConditionalOnClass(org.crsh.plugin.PluginLifeCycle.class) @EnableConfigurationProperties(ShellProperties.class) @Deprecated public class CrshAutoConfiguration extends Object
已过时。as of 1.5 since CRaSH is not actively maintainedAuto-configurationfor embedding an extensible shell 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
management.shell.auth.simple.usernameandmanagement.shell.auth.simple.password.If a Spring Security
AuthenticationManageris detected, this configuration will create aCRaSHPluginto forward shell authentication requests to Spring Security. This authentication method will get enabled ifmanagement.shell.auth.typeis set tospringor if no explicitmanagement.shell.authis provided and aAuthenticationManageris available. In the latter case shell access will be restricted to users having roles that match those configured inManagementServerProperties. Required roles can be overridden bymanagement.shell.auth.spring.roles.To add customizations to the shell simply define beans of type
CRaSHPluginin 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 typeShellProperties.CrshShellPropertiesto 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 usemanagement.shell.command-path-patternsin your application configuration.- 另请参阅:
ShellProperties
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCrshAutoConfiguration.AuthenticationManagerAdapterConfiguration已过时。static classCrshAutoConfiguration.CrshBootstrapBean已过时。Spring Bean used to bootstrap the CRaSH shell.
字段概要
字段 修饰符和类型 字段 说明 static StringAUTH_PREFIX已过时。
构造器概要
构造器 构造器 说明 CrshAutoConfiguration(ShellProperties properties)已过时。
字段详细资料
AUTH_PREFIX
public static final String AUTH_PREFIX
已过时。- 另请参阅:
- 常量字段值
构造器详细资料
CrshAutoConfiguration
public CrshAutoConfiguration(ShellProperties properties)
已过时。
方法详细资料
shellBootstrap
@Bean @ConditionalOnMissingBean(org.crsh.plugin.PluginLifeCycle.class) public CrshAutoConfiguration.CrshBootstrapBean shellBootstrap()
已过时。