Skip to content

WD-307 add localization#3

Open
Boobl1k wants to merge 1 commit intoicerockdev:developfrom
Boobl1k:task/WD-307
Open

WD-307 add localization#3
Boobl1k wants to merge 1 commit intoicerockdev:developfrom
Boobl1k:task/WD-307

Conversation

@Boobl1k
Copy link
Copy Markdown

@Boobl1k Boobl1k commented Mar 27, 2026

No description provided.

}
}

private fun hasKonformValidatedAnnotation(method: Method, index: Int): Boolean {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check out spring annotation utils

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.springframework.core.annotation.AnnotationUtils
org.springframework.core.annotation.AnnotatedElementUtils

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these util classes does not provide functionality to search annotations for parameters in hierarchy. As I understand, they have it for methods and classes only, not for method parameters. So I would keep current implementation


@Component
@ConditionalOnProperty("konform.use-localization", havingValue = "true")
class ConformValidationMessageFormatterWithLocalization(
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to boilerplate

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+


@Component
@ConditionalOnProperty("konform.use-localization", havingValue = "false", matchIfMissing = true)
class ConformValidationMessageFormatterDefault : ConformValidationMessageFormatter {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use conditionalOnMissingBean here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+

@Boobl1k Boobl1k force-pushed the task/WD-307 branch 2 times, most recently from f55cc6e to ffa140d Compare April 9, 2026 14:55
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.

1 participant