2015-04-16 18 views
3

消息這是我在春天servlet.xml中添加春:消息,沒有代碼下找到了地方「en_US」

<bean id="messageSource" 
     class="org.springframework.context.support.ResourceBundleMessageSource"> 
     <property name="basename" value="classpath:application"/> 
    </bean> 

和我application.properties文件裏面的src /主/資源文件夾,但我得到這個例外

SEVERE: Servlet.service() for servlet [MVC-Dispatcher] in context with path [/MVCLayer] threw exception [javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'Login_Username' for locale 'en_US'.] with root cause 
javax.servlet.jsp.JspTagException: No message found under code 'Login_Username' for locale 'en_US'. 
    at org.springframework.web.servlet.tags.MessageTag.doEndTag(MessageTag.java:200) 

請對什麼是錯配置的幫助

回答

6

您應該使用value="application"如果你把你的屬性src/main/resources文件夾內的文件

當然,並確保該application.properties文件包含有Login_Username=

+0

開始的行嘿感謝...這是錯誤我在做什麼我想......只要我刪除classpath它就行了......謝謝:) – Sharique

相關問題