Externalized message.properties file is not picking up in Tomcat

断了今生、忘了曾经 提交于 2019-12-06 07:40:24

Finally I found where I screwed up.

This setter method of messageSource should not be static and I removed static access of messageSource

    messageSource = inMessageSource;
    messageSource.setBasename(System.getProperty("resources.messages.file.path"));

Now code is working fine. And no need of that permission entry in catalina.policy file. Thanks to everyone who helped me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!