Lets say that I have a model for an object X, this object implements all the CRUD operations with the help of Spring Boot.
Now, I need to be able to edit this object using an standard POJO. The POJO looks like this:
public class Foo {
@Autowired
private XRepository xDAO;
/*
Do whatever I want with X and then save it again in the DB using xDAO
*/
}
So far I've tried using @Configurable, @Component and even @Service, but neither of those can @Autowire my XRepository.
What can I do?