Mar 27th, 2012, 10:26 PM
JDBC Tutorial in STS - I am missing where the injection is happening
in the JDBC Tutorial that comes with the STS, I can see where the dataSource is injected into the transactionManager.
And I can see how the Customer, CustomerService and SpringJDBCIntro classes are tied together.
I can even see that the CustomerService is where the magic is happening. What I am not seeing is how the CustomerService interface and the dataSource/transactionManager are getting glued together. I assume that that is where the magic juju is happening that actually hooks the Service methods up to the persistence engine.
What I am not seeing is "What is telling the Spring Framework what concrete class to use for the CustomerService?"
Mar 27th, 2012, 10:36 PM
I found it. It was that d*mn "Focus on Current Task" button. You need to turn it off.
Once I did that, sure enough, there was a man (i.e. classes) hiding behind the curtain. There was the DefaultCustomerService, with all the expected annotations. Just one click away, there was SimpleJdbcCustomerDao that had the expected SimpleJdbcTemplate attribute. With those classes and my ruby slippers, everything fits together nicely.
Tags for this Thread