You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simply adding a dependency on implementation("io.micronaut.azure:micronaut-azure-secret-manager")
and enabling eager initialisation of singleton beans at startup, i.e.
fun main(args: Array<String>) {
build(*args)
.eagerInitSingletons(true)
.start()
}
we expect the app to continue to start up.
Actual Behaviour
We get a DependencyInjectionException when running the application in the local environment even though the config-client is disabled by default or explicitly, i.e.
micronaut:
config-client:
enabled: false
Error:
ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient] could not be loaded: Failed to inject value for parameter [client] of class: io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient
Message: No bean of type [com.azure.security.keyvault.secrets.SecretClient] exists.
* [SecretClient] is disabled because:
- Property [micronaut.config-client.enabled] with value [false] does not equal required value: true
Path Taken: new DefaultSecretKeyVaultClient(SecretClient client) --> new DefaultSecretKeyVaultClient([SecretClient client])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient] could not be loaded: Failed to inject value for parameter [client] of class: io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient
Upon inspection it looks like the following code might be the reason?:
Existing:
@Requires(classes = SecretClient.class)
public class DefaultSecretKeyVaultClient implements SecretKeyVaultClient {
Suggested change (look for beans not class on classpath):
@Requires(beans = SecretClient.class)
public class DefaultSecretKeyVaultClient implements SecretKeyVaultClient {
Expected Behavior
Simply adding a dependency on
implementation("io.micronaut.azure:micronaut-azure-secret-manager")
and enabling eager initialisation of singleton beans at startup, i.e.
we expect the app to continue to start up.
Actual Behaviour
We get a
DependencyInjectionException
when running the application in the local environment even though theconfig-client
is disabled by default or explicitly, i.e.Error:
Upon inspection it looks like the following code might be the reason?:
Existing:
Suggested change (look for beans not class on classpath):
Steps To Reproduce
./gradlew clean run
Environment Information
No response
Example Application
https://github.com/nickmcdowall/micronaut-sample-project
Version
4.7.4
The text was updated successfully, but these errors were encountered: