Announcement Announcement Module
Collapse
No announcement yet.
@ResponseBody and UTF-8 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    @RequestMapping( value = "/getDeptList.htm" )
    public @ResponseBody Map<String,? extends Object> queryDeptList( @ModelAttribute( value = "dept" ) Dept dept ){

    Map<String,Object> map = new HashMap<String, Object>() ;

    List<Dept> deptList = this.deptService.querDeptListService( dept );
    map.put( "commondeptroot", deptList) ;

    return map ;

    }

    <bean class="org.springframework.web.servlet.view.Conten tNegotiatingViewResolver">
    <property name="mediaTypes">
    <map>
    <entry key="json" value="application/json" />
    <entry key="amf" value="application/x-amf"/>
    </map>
    </property>
    <property name="viewResolvers">
    <list>
    <bean class="org.springframework.web.servlet.view.BeanNa meViewResolver" />
    <bean class="org.springframework.web.servlet.view.Intern alResourceViewResolver" >
    <property name="prefix" value="/WEB-INF/views/"/>
    <property name="suffix" value=".jsp"/>
    </bean>
    <bean id="resourceBundleViewResolver" class="org.springframework.web.servlet.view.Resour ceBundleViewResolver" >
    <property name="basenames"><list><value>configs/views-support</value></list></property>
    <property name="order"><value>3</value></property>
    </bean>
    </list>
    </property>
    <property name="defaultViews">
    <list>
    <bean class="org.springframework.web.servlet.view.json.M appingJacksonJsonView" />
    </list>
    </property>
    </bean>

    Comment

    Working...
    X