I\'m learning Spring and I\'m having some problems trying to set up a relatively basic Spring project. I\'m creating an application to simply read from a database, but I\'m havi
You need to create the application context no matter if you are using xml or annotation based configuration. If your application is a web application, see this post Loading context in Spring using web.xml to load the application context
Once you have the application you can get the bean using context.getBean()
method
Also, spring container does not manage the objects you create using new operator. In your example you need to autowire the GetCustomerEvent bean
@Autowired GetCustomerEvent getCustomerEvent;
//and call
getCustomerEvent.getCustomers();