esolve
V2EX  ›  问与答

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

  •  
  •   esolve · Nov 22, 2019 · 1683 views
    This topic created in 2380 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   ·   878 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:56 · PVG 05:56 · LAX 14:56 · JFK 17:56
    ♥ Do have faith in what you're doing.