SpringMvc-view

1.view视图:及springmvc返回到前端的页面,前面的全部跳转都是view的列子在此就不在举例了前端

2.在view界面中如何实现国际化?spring

2.1实现国际化有首先须要配置国际化资源文件:例如mvc

 英文的i18n.properties
 i18n.name=name  i18n.age=age  i18n.pwd=pwd

 中文的i18n.properties

  i18n.name=\u59D3\u540D
  i18n.age=\u5E74\u9F84
  i18n.pwd=\u5BC6\u7801spa

2..2在springMvc配置文件中配置MessageSourcecode

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

3.实现视图之间的直接跳转,不通过springMvnblog

/success:跳转的路径
    <mvc:view-controller path="/success" view-name="success"/>
    <mvc:annotation-driven></mvc:annotation-driven>
相关文章
相关标签/搜索
本站公众号
   欢迎关注本站公众号,获取更多信息