Skip to content

Support @NumberFormat as a meta-annotation [SPR-12743] #17340

Closed

Description

@spring-projects-issues

Kazuki Shimizu opened SPR-12743 and commented

Support @NumberFormat as a meta-annotation the same as @DateTimeFormat.

@NumberFormat(style = NumberFormat.Style.PERCENT)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PercentNumber {}
public class TestBean {
    @PercentNumber
    private Double percent;
    // ...
}

Affects: 4.1 GA

Issue Links:

Referenced from: pull request #741

1 votes, 3 watchers

Activity

  1. spring-projects-issues commented on Feb 22, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Kazuki Shimizu commented

    I submitted PR. Please review it.

  2. spring-projects-issues commented on Mar 7, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Addressed in GitHub commits df1d90f (4.2) and bac012f (4.1.6):

    Support @NumberFormat as a meta-annotation

    This commit ensures that @NumberFormat can be used as a
    meta-annotation, as was already the case for @DateTimeFormat.

    In addition, this commit polishes FormattingConversionServiceTests and
    MvcNamespaceTests.

  3. spring-projects-issues commented on Mar 7, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Please note that this issue is closely related to #17390.

  4. added
    type: enhancement
    in: core
    on Jan 11, 2019
  5. added this to the 4.1.6 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions