Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:添加lombok,bean注入由autowired改为构造器注入 #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DiammdM
Copy link

@DiammdM DiammdM commented Nov 5, 2023

ruoyi-system模块的service所使用的bean都是通过autowired注入的,现修改为spring推荐的构造器注入,引入lombok,使用@AllArgsConstructor快捷生成构造函数 autowired注入spring并不推荐,原因如下:1.容易出现空指针异常。 2.会出现循环依赖的隐患。

@alterem
Copy link

alterem commented Mar 6, 2024

@AllArgsConstructor 能不用就不用吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants