Let’s see the revised testing program, which loads the properties files by using the @PropertySource annotation and then injects them into the message provider implementation. In Listing 4-48, we also added a lot of various annotations that Spring supports for a base Java configuration and their XML equivalents. Note that for the @EnableTransactionManagement annotation to work, we need to add the dependency on the spring-tx module to the project (see Table 4-3).
Table 4-3. Dependency for Spring Transaction Support
Listing 4-48. Java Configuration Class AppConfig (Revised)
package com.apress.prospring4.ch4;import org.springframework.beans.factory.annotation.Autowired; ...
Get Pro Spring,Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.