esolve
V2EX  ›  问与答

如果 @Service 注解的类没有实现某个 Service 接口, Spring 会创建代理类吗?

  •  
  •   esolve · Nov 22, 2019 · 1698 views
    This topic created in 2393 days ago, the information mentioned may be changed or developed.

    如下代码:

    @Service
    MyServiceImpl{
         @Transactional
         doSomething(){
         }
    
    }
    

    这个 MyServiceImpl 没有实现某个 Service 接口,Spring 会创建代理类吗? @Transactional 会起作用吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3196 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 12:27 · PVG 20:27 · LAX 05:27 · JFK 08:27
    ♥ Do have faith in what you're doing.