“`过滤程序包的方法不尽相同。但是弹簧启动提供了一个更复杂的选项,可以在不接触组件扫描的情况下实现这一点。在使用注释@ SpringBootApplication时,可以使用排除属性。请参阅下面的代码片段:

@SpringBootApplication(exclude= {Employee.class})

public class FooAppConfiguration {}

“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.