Results 1 to 2 of 2

Thread: JDBC Tutorial in STS - I am missing where the injection is happening

  1. #1
    Join Date
    Mar 2012
    Posts
    5

    Default 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?"

  2. #2
    Join Date
    Mar 2012
    Posts
    5

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •