当使用@ComponentScan来进行包扫描时
当只扫描一个包可写为
@ComponentScan("包名")
例如:@ComponentScan("com.example.service.rpc")
当扫描的包是多个时,应当使用数组的形式
例如:@ComponentScan({"com.example.service.rpc","com.example.web.controller"})
当使用@ComponentScan来进行包扫描时
当只扫描一个包可写为
@ComponentScan("包名")
例如:@ComponentScan("com.example.service.rpc")
当扫描的包是多个时,应当使用数组的形式
例如:@ComponentScan({"com.example.service.rpc","com.example.web.controller"})