zoukankan      html  css  js  c++  java
  • Could not find acceptable representation

     Resolving exception from handler [null]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
    Resolving exception from handler [null]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
     Resolving exception fromhandler[null]:org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
    springframework.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'spring': assuming HandlerAdapter completed request handling

    因为@RequestMapping(value="/backend/loadUserTypeList.html",produces={"test/html;charset=UTF-8"})中test/html 写错  改为text/html
        @ResponseBody        
        public Object loadUserTypeList(@RequestParam(value="s_roleId",required=false) String s_roleId){
            String cjson="";
            try {
                DataDictionary dataDictionary=new DataDictionary();
                dataDictionary.setTypeCode("USER_TYPE");
                List<DataDictionary> userTypeList=dataDictionaryService.getDataDictionaries(dataDictionary);
                for(DataDictionary d:userTypeList){
                    logger.debug("rtrtrtrtrtrtrryryrytyrytryt"+d.getTypeName());
                }
                JSONArray jo=JSONArray.fromObject(userTypeList);
                cjson=jo.toString();
            } catch (Exception e) {
                // TODO: handle exception
                e.printStackTrace();
            }
            return cjson;
        }

  • 相关阅读:
    Python面向对象——内置对象的功能扩展
    学术日记#学术道德与人文素养
    Python面向对象——基本继承
    SqlServer——字符串处理函数
    SqlServer——索引
    生活小问题(1)
    win7-VS2010-IIS网站的发布问题
    PhoneGap+Cordova+SenchaTouch-01-环境搭建
    sql server数字转字符串出现科学计数法
    SQLServer 重启服务后,自增1的标识列一次增长了1000(转自博问)
  • 原文地址:https://www.cnblogs.com/pangting/p/7460154.html
Copyright © 2011-2022 走看看