I have a model A and B and a relation model A_B
Now I want to have a getter in class A get something from class A-B So I @Autowired the repo of A_B in the model A but it gives an error.
Is there any way to use a postconstruct kinda Autowire?
Here is my code:
@autowire IrepoA_B irepoA_B;
@PostConstruct
public boolean getVar() {
return irepoA_B.getByTrackId(this.getId()).var();
}
How do I fix this so that he does not give the error:
Error creating bean with name 'entityManagerFactory' defined in class
path resource........