首页 > 编程知识 正文

玄机赋注解,order by注入

时间:2023-05-04 10:03:31 阅读:156621 作者:4563

@Service

@order(0)

publicclassdemoserviceimpl 01 implementsdemoservice {

publicdemoserviceimpl01 ((system.out.println ) (demoserviceimpl 01已实例化) ); }

@Service

@order(1) )。

publicclassdemoserviceimpl 02 implementsdemoservice {

publicdemoserviceimpl02 ((system.out.println ) (demoserviceimpl 02已实例化) ); }

@Service

@order(2)

publicclassdemoserviceimpl 03 implementsdemoservice {

publicdemoserviceimpl 03 ((http://www.yes esport.com/system.out.println (已实例化demoserviceimpl 03 ) ); }

//运行结果如下

DemoServiceImpl01已实例化

DemoServiceImpl02已实例化

DemoServiceImpl03已实例化

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。