@ComponentScan配置扫描多个包

我的Spring版本是5.2.6,使用@ComponentScan扫描多个包的注解配置:

@Configuration
@ComponentScan(basePackages = {"bean","dao","service"})
public class TxConfig {
    
}

你可能感兴趣的:(Spring,spring,java,后端,ComponentScan)