I'm trying to use SpringData in a JFace / SWT project. Because the CrudRepository auto-deployment feature is fantastic and very advantageous.
For this, I include here in the classpath the necessary SpringData things: Spring Data Commons, Spring Data JPA, Spring Bean, Spring Context.
For me, it would be only 4 steps to do this manually:
1 - Include the jars in the classpath (I have no classpath error) 2 - Note in the application the information for the Spring to leave the classes cassandos:
@Configuration
@ComponentScan(basePackages = "org.wender.foobar")
public class ControleGadoApp extends ApplicationWindow {
3 - Create an interface that extends the CrudRepository:
public interface ClientRepository extends CrudRepository
4 - Create a class attribute and annotate it with @Autowired
public class TelaCliente extends AbstractTela {
@Autowired
private ClienteRepository repository;
These four steps were not enough, @Autowired did not work and the class variable is coming null.
Are there any other settings?