gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-11-01 03:23:55 26 4
gpt4 key购买 nike

我的项目不能在全局端的 GAE 中运行,但它可以在本地 GAE 服务器中正常运行。来自全局服务器的日志:

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

我在调用 getLogin() 方法时看到此异常,但方法 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

关于java - GAE中: java. lang.ClassNotFoundException : org. springframework.util.StreamUtils引起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20604748/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com