Open TranNgocKhoa opened 4 years ago
It throws error on startup It keeps asking for default constructor.
I have successfully injected a Spring dependency into custom type handler, using @EnableSpringConfigured
(on an @Configuration
class) and @Configurable
(on the type handler class) from org.springframework:spring-aspects
. You would also need to @Autowired
a field or a setter inside the type handler.
See Using AspectJ to Dependency Inject Domain Objects with Spring
Edit: AspectJ weaving is a prerequisite for this to work.
I know there is already an issue at #218 and solution is:
But I think bellow is better because now is 2020 and we should use Java Configuration.
And then in
application.yml
of Spring Boot application:Please add support for this. Thank you so much!