当前位置:网站首页>Under what circumstances do you need to manually write the @bean to the container to complete the implementation class
Under what circumstances do you need to manually write the @bean to the container to complete the implementation class
2022-06-25 18:28:00 【Huang3stone】
Springboot In the project
Whenever a method is encountered, it needs to return Its corresponding implementation class when
So you need to implement this class , You use @Autowired Introduce
But after the introduction of this class not always Exist Bean In container
So write this blog post to record how to judge whether it is necessary to @Bean The introduction of
for example ( Situations that need to be manually added to the container )
This is a code about rewriting the configuration class ,
You can see endpoints.authenticationManager() This method
Need one AuthenticationManager Implementation class
How to determine whether manual operation is required @Bean Add a container ?
adopt ctrl+ left-click Enter this class 
I found that this class is No, Inject into the container , So we need to Manual Add this class to the container .
contrast ( Situations that do not require manual implementation ))
RedisTokenStore() There needs to be a RedisConnectionFactory class
ctrl+ left-click Enter this class 
You can find that this class has been injected into the container , Manual injection is not required
You can go directly through **@Autowired** It can be used after being introduced .
边栏推荐
- 【深入理解TcaplusDB技术】创建游戏区
- There is a repeating element iii[pruning with ordered ordering]
- JVM understanding
- 【深入理解TcaplusDB技术】一键安装Tmonitor后台
- OSError: Unable to open file (truncated file: eof = 254803968, sblock->base_addr = 0, stored_eof = 2
- RMAN备份数据库_双重备份备份集(Duplexing Backup Sets)
- LeetCode力扣(剑指offer 26-30)26. 树的子结构 27. 二叉树的镜像 28. 对称的二叉树 29. 顺时针打印矩阵 30. 包含min函数的栈
- Training of long and difficult sentences in postgraduate entrance examination day83
- Qi v1.2.4协议 之 定频调压方案
- 【深入理解TcaplusDB技术】单据受理之事务执行
猜你喜欢

【深入理解TcaplusDB技术】TcaplusDB运维
![存在重复元素III[利用排序后的有序性进行剪枝]](/img/26/5c3632a64945ea3409f8240ef5b18a.png)
存在重复元素III[利用排序后的有序性进行剪枝]
![[in depth understanding of tcapulusdb technology] new models of tcapulusdb](/img/10/f94a5e1ebeaa803c754dd77351950f.png)
[in depth understanding of tcapulusdb technology] new models of tcapulusdb

What is an operator?

LeetCode力扣(剑指offer 26-30)26. 树的子结构 27. 二叉树的镜像 28. 对称的二叉树 29. 顺时针打印矩阵 30. 包含min函数的栈

Good news | Haitai Fangyuan has passed the cmmi-3 qualification certification, and its R & D capability has been internationally recognized
![[deeply understand tcapulusdb technology] one click installation of tmonitor background](/img/0a/742503e96a9b51735f5fd3f598b9af.png)
[deeply understand tcapulusdb technology] one click installation of tmonitor background

04 program counter (PC register)

How can the self-supporting number evaluation be safer for cross-border e-commerce platforms such as Amazon, eBay, shopee, lazada, express, Wal Mart and Alibaba international?

Matlab中图形对象属性gca使用
随机推荐
【深入理解TcaplusDB技术】单据受理之事务执行
[deeply understand tcapulusdb technology] tmonitor system upgrade
How can the self-supporting number evaluation be safer for cross-border e-commerce platforms such as Amazon, eBay, shopee, lazada, express, Wal Mart and Alibaba international?
《痞子衡嵌入式半月刊》 第 57 期
Boiled peanuts
OSError: Unable to open file (truncated file: eof = 254803968, sblock->base_addr = 0, stored_eof = 2
new TypeReference用法 fastjson[通俗易懂]
十大券商的排名是?手机开户安全么?
anaconda下载清华源
[how do I refresh the shuttle page after jumping back?]
[deeply understand tcapulusdb technology] tmonitor module architecture
[in depth understanding of tcapulusdb technology] tcapulusdb regular documents
Idea annotation color modification method (clear)
【路径规划】如何给路径增加运动对象
What is the ranking of the top ten securities companies? Is it safe to open a mobile account?
C ASP, net core framework value transfer method and session use
LeetCode 198. Looting & dynamic planning
Kwai 616 war report was launched, and the essence was thrown away for the second time to lead the new wave. Fast brand jumped to the top 3 of the hot list
Fixed frequency and voltage regulation scheme of Qi v1.2.4 protocol
How to sort massive data? How to process data between memory and hard disk?