Я продолжаю получать эту ошибку: < /p>
Код: Выделить всё
io.micronaut.context.exceptions.DependencyInjectionException: Failed to inject value for parameter [serviceEndpointProvider] of class: {path}.ApiClient
Message: No bean of type [{path}.ServiceEndpointProvider] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
Path Taken: new ApiClient(ServiceEndpointProvider serviceEndpointProvider) --> new ApiClient([ServiceEndpointProvider serviceEndpointProvider])
@Singleton
@Requires(
missingProperty = "canary.service-endpoint"
)
public class OfflineServiceEndpointProvider implements ServiceEndpointProvider {
private final String serviceEndpoint;
public OfflineServiceEndpointProvider(EmbeddedServer embeddedServer) {
this.serviceEndpoint = embeddedServer.getURI().toString();
}
public String endpoint() {
return this.serviceEndpoint;
}
}
< /code>
У меня нет этого свойства в моем приложении. Прозрачные файлы, и у него уже есть аннотация Singleton. У кого -нибудь есть идеи, почему это может произойти?
Подробнее здесь: https://stackoverflow.com/questions/793 ... n-my-setup
Мобильная версия