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

边栏推荐
- "Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
- Interview stereotyped version
- Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
- C语言初阶-指针详解-庖丁解牛篇
- [shutter] banner carousel component (shutter_wiper plug-in | swiper component)
- random shuffle注意
- Notifydatasetchanged not applicable to recyclerview - notifydatasetchanged not working on recyclerview
- Practice of traffic recording and playback in vivo
- Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
- [translation] the background project has joined the CNCF incubator
猜你喜欢

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

Matlab tips (24) RBF, GRNN, PNN neural network

Didi programmers are despised by relatives: an annual salary of 800000 is not as good as two teachers

Distributed transaction
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/c7/6b5ab4ff7379bfccff7cdbb358ff8f.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

I2C subsystem (IV): I2C debug
![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
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/7e/ad9ea78868126b149bd9f15f587e6c.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs
随机推荐
Andwhere multiple or query ORM conditions in yii2
Today, it's time to copy the bottom!
Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
一文带你了解 ZigBee
xiaodi-笔记
I2C 子系統(四):I2C debug
Force freeing memory in PHP
What does "where 1=1" mean
JS finds all the parent nodes or child nodes under a node according to the tree structure
Random shuffle note
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
SQL Server Query spécifie la structure de la table
The Linux server needs to install the agent software EPS (agent) database
How to implement append in tensor
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]
Choose it when you decide
Sqlserver row to column pivot
Creation and destruction of function stack frame
I2C subsystem (I): I2C spec
【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)