当前位置:网站首页>The difference between componentscan and componentscans
The difference between componentscan and componentscans
2022-07-03 02:57:00 【A stream kite CD】
stay Spring in @ComponentScan() It is used to scan the comments under a package ,ComponentScans It is also used to scan annotations , But the difference between them is :
- ComponentScan You can write one or more packages at a time
@ComponentScan It is often annotated in @Configuration In the class , Used to add automatically scanned packages . We can use properties basePackages perhaps value Specify one or more packages to scan .@ComponentScan("com.nn")@ComponentScan(value = {"com.nn.bean","com.nn.dao"})- ComponentScans You can declare more than one ComponentScan
@ComponentScans Is another annotation of the scanning package , There is an attribute of the array situation value, The type of array is @ComponentScan, That's one @ComponentScans You can configure multiple @ComponentScan@ComponentScans(value={@ComponentScan("com.nn.bean"),@ComponentScan("com.nn.service")})

边栏推荐
- [translation] the background project has joined the CNCF incubator
- What is the way out for children from poor families?
- How to change the panet layer in yolov5 to bifpn
- Creation and destruction of function stack frame
- Add automatic model generation function to hade
- 用docker 连接mysql的过程
- SQL server queries the table structure of the specified table
- [translation] flux is safe. Gain more confidence through fuzzy processing
- Pytest (6) -fixture (Firmware)
- 2022-2028 global splicing display industry research and trend analysis report
猜你喜欢

Your family must be very poor if you fight like this!

Opengauss database development and debugging tool guide

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)

C language beginner level - pointer explanation - paoding jieniu chapter

Check log4j problems using stain analysis

I2C 子系统(二):I3C spec

Kubernetes family container housekeeper pod online Q & A?

random shuffle注意

Super easy to use logzero

Joking about Domain Driven Design (III) -- Dilemma
随机推荐
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
sql server 查询指定表的表结构
random shuffle注意
Opengauss database development and debugging tool guide
2022-2028 global splicing display industry research and trend analysis report
The core idea of performance optimization, dry goods sharing
[hcia]no.15 communication between VLANs
迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
Wechat - developed by wechat official account Net core access
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
Cancer biopsy instruments and kits - market status and future development trends
sql server 查詢指定錶的錶結構
Linear rectification function relu and its variants in deep learning activation function
Do you really understand relays?
Pytest (6) -fixture (Firmware)
Source code analysis | resource loading resources
Can I use read-only to automatically implement properties- Is read-only auto-implemented property possible?
Distributed transaction
Super easy to use logzero
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)