SpringMvc-view

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

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

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

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

 中文的i18n.properties

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

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

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

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

/success:跳转的路径
    <mvc:view-controller path="/success" view-name="success"/>
    <mvc:annotation-driven></mvc:annotation-driven>

 

posted @ 2017-06-18 02:04  小拽A  阅读(256)  评论(0编辑  收藏  举报