1 ,错误原因,循环冗余检查      result.setNearUsers(userList);            Page page = new Page();            page.setTotal(searchNearUser.getTotal());            page.setSize(userList.size());            page.setPage(discoverGetForm.getPaging());            resu…
一个运行了很久的项目,最近忽然报错:OOM( java.lang.OutOfMemoryError: Java heap space),异常如下 org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: Java heap space at org.springframework.web.servle…
tomcat工程中创建二维码失败.抛出异常Can't connect to X11 window server using 'localhost:10.0' as the value of th 因为在linux系统中,创建图形画布失败.linux系统图形控件未启动导致的. 解决方法: java启动参数中添加 -Djava.awt.headless=true / 编辑tomcat目录下的bin/catalina.sh文件, 类似: exec "$_RUNJDB" "$LOGG…
因为谷歌的lists不支持或使用, 所有要改成java的list工具 谷歌list使用: import com.google.common.collect.Lists; .... Lists.newArrayList()java list 使用: List<String> list =new ArrayList<>();…
在使用SpringMVC绑定基本类型(如String,Integer等)参数时,应通过@RequestParam注解指定具体的参数名称,否则,当源代码在非debug模式下编译后,运行时会引发HandlerMethodInvocationException异常,这是因为只有在debug模式下编译,其参数名称才存储在编译好的代码中. 譬如下面的代码会引发异常: @RequestMapping(value = "/security/login", method = RequestMethod…
问题描述:当我在model中添加了一下代码以后数据库报错: 添加的代码为: private Viewpoint viewpoint; public Viewpoint getViewpoint() { return viewpoint; } public void setViewpoint(Viewpoint viewpoint) { this.viewpoint = viewpoint; } 错误信息为: -- ::-exec-] ERROR [CsrfFilter:] - doFilter…
问题:调用的方法在一个接口类中,但我并没有注入那个被调用的类 解决:在UserEntity前加上@Autowired @Controller public class MainController { // 自动装配数据库接口,不需要再写原始的Connection来操作数据库 @Autowired UserRepository userRepository; @RequestMapping(value = "/",method = RequestMethod.GET) public S…
@RequestMapping(value = "/security/login", method = RequestMethod.POST) public ModelAndView login(@RequestParam String userName, @RequestParam String password, HttpServletRequest request) { ...................... 如果使用Eclipse编译不会在运行时出现异常,这是因为Ecli…
之前做的项目是resteasy的上传,代码没有问题,断点都不进来呢. 我以为可以直接移植到SpringMVC,但是SpringMVC不支持MultipartFormDataInput , 用MultipartFile就可以了.老的无法兼容新的.正确代码如下 @RequestMapping(value = "/importExcelForEduQuestion",produces = "application/json; charset=utf-8")@Respons…
出现这个问题往往伴随  HTTP-500错误 报错信息: HTTP Status - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config type Exception report message Handler processing failed; nested exception is java.lang.NoClas…