Spring @Transactional annotation not working with auto-wiring?

前端 未结 3 1736
闹比i
闹比i 2021-01-05 12:39

My application uses Spring auto-wiring to configure the beans. I have just tried adding @Transactional and the expected proxies do not seem to be called. I want the Personal

3条回答
  •  猫巷女王i
    2021-01-05 13:04

    Define an interface for UpdatePublicMapService, and use that interface under the @Autowired annotation in your controller. Leave the @Transactionnal annotation in the UpdatePublicMapService class implementation, and Spring should deal just fine with your autowired transactionnal object.

提交回复
热议问题