2 u012953466 u012953466 于 2016.02.29 21:29 提问

Spring mvc 3.2下Ajax获取406 (Not Acceptable)

Spring mvc 3.2下Ajax获取406 (Not Acceptable) 求助 大神来帮帮忙

2个回答

u012953466
u012953466   2016.02.29 21:34

@ResponseBody
@RequestMapping(value = "/resultMap.do", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public Result getResultJsone(HttpServletRequest request, ModelMap modelMap)

u012953466
u012953466   2016.02.29 21:39

<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
/context:component-scan
<!-- hibernate -->
destroy-method="close">





class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">


com.map.domain.Location
com.map.domain.img.Maptile
com.map.domain.img.Room
com.map.domain.point.Pp
com.map.domain.nav.Nav
com.map.domain.LocationVo





org.hibernate.dialect.MySQLDialect
true
true
update


<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
</bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
    <property name="sessionFactory" ref="sessionFactory" />
</bean>

<tx:annotation-driven transaction-manager="transactionManager" />

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!