Difference between and

前端 未结 15 2424
再見小時候
再見小時候 2020-11-22 04:44

I\'m learning Spring 3 and I don\'t seem to grasp the functionality behind and .

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 05:29

    As a complementary, you can use @ComponentScan to use in annotation way.

    It's also described at spring.io

    Configures component scanning directives for use with @Configuration classes. Provides support parallel with Spring XML's element.

    One thing to note, if you're using Spring Boot, the @Configuration and @ComponentScan can be implied by using @SpringBootApplication annotation.

提交回复
热议问题