当前位置:网站首页>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")})

边栏推荐
- 【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
- Three. JS local environment setup
- I2C subsystem (I): I2C spec
- I2C 子系统(二):I3C spec
- SQL statement
- Change cell color in Excel using C - cell color changing in Excel using C
- Kubernetes family container housekeeper pod online Q & A?
- sql server 查詢指定錶的錶結構
- [error record] the parameter 'can't have a value of' null 'because of its type, but the im
- js根据树结构查找某个节点的下面的所有父节点或者子节点
猜你喜欢

Add automatic model generation function to hade

docker安装mysql

Opengauss database development and debugging tool guide

用docker 连接mysql的过程

SqlServer行转列PIVOT

Three. JS local environment setup
![ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc](/img/cb/145937a27ef08050a370d5a255215a.jpg)
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
![[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)](/img/6a/ae44ddb090ce6373f04a550a15f973.jpg)
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
![[translation] the background project has joined the CNCF incubator](/img/0b/e3d2674b1a1cba3ea398cbcb1a018a.png)
[translation] the background project has joined the CNCF incubator

Baidu map - surrounding search
随机推荐
A2L file parsing based on CAN bus (2)
open file in 'w' mode: IOError: [Errno 2] No such file or directory
Force freeing memory in PHP
Add automatic model generation function to hade
HTB-Devel
Concrete CMS vulnerability
Practice of traffic recording and playback in vivo
I2C subsystem (II): I3C spec
Use cve-2021-43893 to delete files on the domain controller
Source code analysis | resource loading resources
C语言初阶-指针详解-庖丁解牛篇
sql server数据库添加 mdf数据库文件,遇到的报错
[C language] MD5 encryption for account password
函数栈帧的创建与销毁
TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
Super easy to use logzero
How to implement append in tensor
Cron表达式介绍
I2C 子系统(二):I3C spec
docker安装mysql