-
Notifications
You must be signed in to change notification settings - Fork 3
[feature] 지원서 수정 요청시에 설명필드가 비어있는지 검증을 한다 #1216
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
Merged
lepitaaar
merged 3 commits into
develop/be
from
feature/#1215-add-validation-application-description-field-MOA-664
Feb 23, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Moadong/moadong
Length of output: 1760
🏁 Script executed:
Repository: Moadong/moadong
Length of output: 2125
🏁 Script executed:
Repository: Moadong/moadong
Length of output: 2973
🌐 Web query:
Spring DataBinder@AssertTrueprivate method NotReadablePropertyException validation💡 Result:
In Spring MVC /
DataBinder-triggered Bean Validation (@Validon a form/model attribute), Hibernate Validator validates bean properties (fields or JavaBeans getters). If you put@AssertTrueon a private helper method that is not a JavaBeans getter, Spring/HV won’t treat it as a constraint to execute; instead you can end up with Spring trying to resolve it as a property and failing withNotReadablePropertyException(no readable getter for that “property”). (stackoverflow.com)Fixes
Make it a real JavaBeans boolean getter and annotate that
This is the standard way for cross-field checks with
@AssertTruein bean validation. (stackoverflow.com)Or annotate a field instead of a method
(Field constraints don’t depend on getter naming; the validator can access fields directly.) (docs.hibernate.org)
If you truly want “method validation” (arbitrary methods), don’t use
DataBinderfor thatUse executable/method validation (e.g., Spring’s
@Validatedon service methods).DataBindervalidation is about validating the bound bean, not invoking arbitrary private methods. (docs.spring.io)Citations:
🌐 Web query:
Bean Validation@AssertTrueproperty constraint public getter requirement specification💡 Result:
In Bean Validation, a property constraint such as
@AssertTruemay be placed on a JavaBeans getter (i.e., the read accessor). The specification’s requirements are:getX()(no parameters) or, for boolean properties,isX()(no parameters, returnsboolean). The property name is derived viajava.beans.Introspector.decapitalize(...). [1]publicby the Bean Validation spec (though some frameworks/contexts may impose additional rules outside the spec). [1]Sources:
[1] Bean Validation spec, “Field and property validation” (JavaBeans conventions + visibility not constrained) https://beanvalidation.org/latest-draft/spec/
[2] Bean Validation spec, “Requirements on classes to be validated” (static excluded) https://beanvalidation.org/latest-draft/spec/
private접근자의@AssertTrue메서드는 Spring의 데이터 바인더에서 유효성 검증 실패 시 문제를 유발할 수 있습니다.Bean Validation 사양은 제약 조건을
private메서드에 적용하는 것을 금지하지 않지만, Spring MVC의 DataBinder는 유효성 검증 실패 시 JavaBeans 규약에 따라 프로퍼티를 조회하려 시도합니다. 이 경우internalFormValid,externalFormValid프로퍼티가 접근 불가능하면NotReadablePropertyException을 발생시켜 400 오류 대신 500 오류를 반환할 수 있습니다.접근 제어자를
public으로 변경하여 JavaBeans 컨벤션을 준수하면 이 문제가 해결되며, 코드의 의도도 명확해집니다.제안 수정
참고: 동일한 패턴이
ClubApplicationFormCreateRequest.java에도 존재하므로 함께 수정이 필요합니다.🤖 Prompt for AI Agents