本文整理匯總了Java中org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties類的典型用法代碼示例。如果您正苦於以下問題:Java KeyAuthenticationProperties類的具體用法?Java KeyAuthenticationProperties怎麽用?Java KeyAuthenticationProperties使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
KeyAuthenticationProperties類屬於org.springframework.boot.actuate.autoconfigure.ShellProperties包,在下文中一共展示了KeyAuthenticationProperties類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testBindingKey
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Test
public void testBindingKey() {
KeyAuthenticationProperties props = load(KeyAuthenticationProperties.class,
"management.shell.auth.key.path=~/.ssh/test.pem");
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertThat(p.get("crash.auth.key.path")).isEqualTo("~/.ssh/test.pem");
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:9,代碼來源:ShellPropertiesTests.java
示例2: testBindingKeyIgnored
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Test
public void testBindingKeyIgnored() {
KeyAuthenticationProperties props = load(KeyAuthenticationProperties.class);
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertThat(p.get("crash.auth.key.path")).isNull();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:8,代碼來源:ShellPropertiesTests.java
示例3: testBindingKey
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Test
public void testBindingKey() {
KeyAuthenticationProperties props = new KeyAuthenticationProperties();
RelaxedDataBinder binder = new RelaxedDataBinder(props, "shell.auth.key");
binder.setConversionService(new DefaultConversionService());
Map<String, String> map = new HashMap<String, String>();
map.put("shell.auth.key.path", "~/.ssh/test.pem");
binder.bind(new MutablePropertyValues(map));
assertFalse(binder.getBindingResult().hasErrors());
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertEquals("~/.ssh/test.pem", p.get("crash.auth.key.path"));
}
示例4: testBindingKeyIgnored
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Test
public void testBindingKeyIgnored() {
KeyAuthenticationProperties props = new KeyAuthenticationProperties();
RelaxedDataBinder binder = new RelaxedDataBinder(props, "shell.auth.key");
binder.setConversionService(new DefaultConversionService());
Map<String, String> map = new HashMap<String, String>();
binder.bind(new MutablePropertyValues(map));
assertFalse(binder.getBindingResult().hasErrors());
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertNull(p.get("crash.auth.key.path"));
}
示例5: keyAuthenticationProperties
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Bean
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "key")
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
public KeyAuthenticationProperties keyAuthenticationProperties() {
return new KeyAuthenticationProperties();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:7,代碼來源:CrshAutoConfiguration.java
示例6: keyAuthenticationProperties
import org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties; //導入依賴的package包/類
@Bean
@ConditionalOnProperty(prefix = "shell", name = "auth", havingValue = "key")
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
public KeyAuthenticationProperties keyAuthenticationProperties() {
return new KeyAuthenticationProperties();
}