AbstractVaultConconfiguration является частью Spring Vault, которая обеспечивает интеграцию Hashicorp Vault для Spring. AbstractVaultConfiguration , я включил зависимость от пружины.
Код: Выделить всё
org.springframework.vault
spring-vault-core
3.1.2
< /code>
Это ошибка, полученная: < /p>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [abc.class]: No matching factory method found on class [abc.MsConfig]: factory bean 'mssConfig'; factory method 'sessionManager()'. Check that a method with the specified name exists and that it is non-static.
< /code>
Пример: < /p>
@Configuration
public class A extends AbstractVaultConfiguration{
@Override
public VaultEndpoint vaultEndpoint(){
// Some Custom Implementation
...
}
@Override
@Bean
public ClientAuthentication clientAuthentication(){
// Some Custom Implementation
...
}
@Override
public SessionManager sessionManager(){
// Some Custom Implementation
...
}
}
@Configuration
public class B extends AbstractVaultConfiguration{
@Override
public VaultEndpoint vaultEndpoint(){
// Some Custom Implementation
...
}
@Override
@Bean(name = "customClientAuthentication")
public ClientAuthentication clientAuthentication(){
// Some Custom Implementation
...
}
@Override
@Bean(name = "customSessionManager")
public SessionManager sessionManager(){
// Some Custom Implementation
...
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... springboot