引起:GAE中的java.lang.ClassNotFoundException:org.springframework.util.StreamUtils

我的项目在全球范围内不适用于GAE,但它在本地GAE服务器中正常工作.

来自全局服务器的日志:

Caused by: java.lang.ClassNotFoundException: org.springframework.util.StreamUtils

当我调用getLogin()方法时,我看到了这个异常,但是methos setUserINN()工作正常.

@RequestMapping(value="/getSalesInfo", method = RequestMethod.GET)  
    public @ResponseBody String getLogin(){
        MasterAccountInfo msi = dataMethods.getMasterAccountInfo();
        ObjectMapper mapper = new ObjectMapper();
        try {
            return mapper.writeValueAsString(msi);
        } catch (JsonProcessingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return "failed transform";
        }
    }

    @RequestMapping(value="/setuserINN", method = RequestMethod.POST)
    public String setUserINN(@RequestParam("INN") String INN){
        Principal pr = SecurityContextHolder.getContext().getAuthentication();
        String str = pr.getName();
        dataMethods.changeUserInfo(str, INN);
        return "redirect:/myaccount";
    }
}

我不知道这个问题.请帮忙.

最佳答案 StreamUtils在Spring 3.2.2中添加.你需要升级到至少那个版本的Spring才能工作.

http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/StreamUtils.html

点赞