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
Is there any support for spring-native when using datastore and its DatastoreRepository?
I have declared my repository like this:
public interface CategoryRepository extends DatastoreRepository<Category, Long> {
}
Then I have another class that uses the repo:
@Component
public class Gateway {
@Autowired
private CategoryRepository categoryRepository;
......
}
While the project builds using spring-native, on start up I get the following exception:
***************************
APPLICATION FAILED TO START
***************************
Description:
Field categoryRepository in ch.do.storage.repo.Gateway required a bean of type 'ch.do.storage.repo.CategoryRepository' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'ch.do.storage.repo.CategoryRepository' in your configuration.
In the file build/generated/resources/aotMain/MAIN-INF/spring.components, there is the following entry:
You can try to add spring native dependency, which would likely take care of Spring-specific annotations/reflection. But we have not tested these projects with native at this point.
Thanks for confirming! We have plans to look into native compilation compatibility after Spring Boot 3.0 comes out, but it definitely won't be supported until 2023.
Is there any support for spring-native when using datastore and its DatastoreRepository?
I have declared my repository like this:
Then I have another class that uses the repo:
While the project builds using spring-native, on start up I get the following exception:
In the file build/generated/resources/aotMain/MAIN-INF/spring.components, there is the following entry:
Is there some kind of additional configuration needed (like NativeHint)? How would it look like?
The text was updated successfully, but these errors were encountered: