fix: 解决数据源新增和修改时密码无法保存的问题 #493#494
Open
ZhangDT-sky wants to merge 1 commit into
Open
Conversation
Signed-off-by: ZhangDT-sky <485918776@qq.com>
6df985b to
fe27e15
Compare
1 task
Collaborator
|
功能验证通过的截图有吗? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
修复在新增或修改数据源时,前端传入的密码由于序列化配置问题未被持久化到数据库,导致后续数据源连接失败的问题。
Does this pull request fix one issue?
Fixes #493
Describe how you did it
Datasource实体类中password字段的注解由@JsonIgnore改为WRITE_ONLY访问级别,确保后端能接收前端参数且不在返回时泄露。DatasourceServiceImpl更新逻辑中,增加对密码和用户名的非空判断。若更新请求未传密,则自动保留数据库原有的凭据,防止更新操作导致密码被置空。Describe how to verify it
Special notes for reviews
无