@Service("yeepay") publicclassYeepayService(){ publicstaticvoidsayHi(){ System.out.println("Hi,維C果糖!"); } } 在這里,@Service(“XXX”),就相當(dāng)于將這個類定義為一個 bean,其中,XXX 即為 bean 的名稱。此外,咱們只用此注解標(biāo)記 bean,如果不填 value 的話,則 Spring 生成的 bean 名稱是取類名,然...
www.dbjr.com.cn/article/1073...htm 2025-6-8