当前位置:网站首页>@Requiredargsconstructor annotation
@Requiredargsconstructor annotation
2022-07-28 04:02:00 【Chen dada's expectation】
Today, in the process of development, I found that service Layer using @Autowried Annotation injection Mapper There was a red hot issue , Although it does not affect the operation of the program , But it looks bad . I used to be Mapper Add annotation to layer @Repository To solve this problem , But today I saw someone else's project used lombok Rely on the provided @RequiredArgsConstructor Annotation to solve this problem , And I think it's better than using @Autowried Better annotation
But in use @RequiredArgsConstructor When the annotation , When you need to inject mapper You must use final To modify .


边栏推荐
猜你喜欢

Crowdfunding platform system based on JSP & Servlet

Dynamic programming - 509. Fibonacci number

security异常处理机制

From Clickhouse to Snowflake: MPP query layer

Implementation of online rental system based on SSM

Un7.27: how to successfully build a ruoyi framework project in idea?

Developing rc522 module based on c8t6 chip to realize breathing lamp

Appnium--APP自动化测试工具

程序人生 | 测试工程师还只会点点点?7个捷径教给你快速学习新技术...

TypeError: ufunc ‘bitwise_ and‘ not supported for the input types, and the inputs could not be safely
随机推荐
It's amazing. This article completely explains the service interface testing
Appnium--APP自动化测试工具
Basic knowledge of day08 redis
WordPress简约mkBlog博客主题模板v2.1
7/27(板子)染色法判定二分图+求组合数(递推公式)
[MySQL database] index and transaction (often used in interview)
Data mining-01
金仓数据库KingbaseES安全指南--5.2. 数据完整性保护
TypeError: ufunc ‘bitwise_ and‘ not supported for the input types, and the inputs could not be safely
LightPicture – 精致图床系统
简单、好用的性能测试工具推荐
Build an "industrial brain" and improve the park's operation, management and service capabilities with "digitalization"!
Leetcode 0141. circular linked list - three solutions
un7.27:redis数据库常用命令。
security异常处理机制
Leetcode58. 最后一个单词的长度
Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving
Greedy - 53. Maximum subarray sum
CANopen learning notes
Input upload file and echo FileReader and restrict the type of file selection