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

Provide alternative message code resolver styles #167

Closed
wants to merge 1 commit into from

Conversation

philwebb
Copy link
Member

Introduce new 'style' property to DefaultMessageCodesResolver allowing
for alternative message styles. Current styles are PREFIX_ERROR_CODE
and POSTFIX_ERROR_CODE. The default style retains existing behavior.

Issue: SPR-9707

Introduce new 'style' property to DefaultMessageCodesResolver allowing
for alternative message styles.  Current styles are PREFIX_ERROR_CODE
and POSTFIX_ERROR_CODE.  The default style retains existing behavior.

Issue: SPR-9707
@philwebb
Copy link
Member Author

@cbeams @jhoeller Any comments on the use of inner static enum (see some but not much precedence in the existing code). I don't like the idea of a boolean flag because it is not easy to extend. Also feedback on the names welcome.

@ghost ghost assigned cbeams Oct 21, 2012
cbeams added a commit that referenced this pull request Oct 30, 2012
# By Chris Beams (1) and Phillip Webb (1)
* SPR-9707:
  Introduce MessageCodeFormatter abstraction
  Provide alternative message code resolver styles
@cbeams
Copy link
Contributor

cbeams commented Oct 30, 2012

Thanks Phil, this is merged. Take a look at 38bfb2b to see a couple naming changes, and a combined interface/enum-based approach to preserve both convenience and flexibility (indeed, per your comment above, ensuring that the solution is easily extensible -- not only by us but by users too).

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.

2 participants