开发者

Spring resource bundle custom annotation message

开发者 https://www.devze.com 2023-03-28 19:40 出处:网络
Is there a naming convention for writing the resource bundle key in spring custom annotations? I have this message inside a custom annotation:

Is there a naming convention for writing the resource bundle key in spring custom annotations?

I have this message inside a custom annotation:

String message() default "{ro.scorpionsoftware.demo3.customAnnotations.checkCase.CheckCase.message}";

And in my properties file I have the ro.scorpionsoftware.demo3.customAnnotations.checkCase.CheckCase.message key

I know that spring can access the file cause I've tested it on a jsp. The problem is that when the annotation fails the error message is not taken from the bundle. All that is shown i开发者_Go百科s the String {ro.scorpionsoftware.demo3.customAnnotations.checkCase.CheckCase.message}

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号