Java Junit减少控制台的详细日志
有没有办法在spring引导时限制junit的日志?下面是我的Java Junit减少控制台的详细日志,java,spring-boot,junit,Java,Spring Boot,Junit,有没有办法在spring引导时限制junit的日志?下面是我的JSONAssert.assertEquals的结果,因为body的大小太大,无法在控制台上显示,所以我得到java.lang.OutOfMemoryError:java堆空间 顺便说一下,我不能增加jvm的堆大小 MockHttpServletRequest: HTTP Method = GET Request URI = /301c646a-bdc0-40e4-812e-16e3c83f37a3
JSONAssert.assertEquals
的结果,因为body
的大小太大,无法在控制台上显示,所以我得到java.lang.OutOfMemoryError:java堆空间
顺便说一下,我不能增加jvm的堆大小
MockHttpServletRequest:
HTTP Method = GET
Request URI = /301c646a-bdc0-40e4-812e-16e3c83f37a3
Parameters = {}
Headers = {Accept=[application/json]}
Handler:
Type = ...
Method = ...
Async:
Async started = false
Async result = null
Resolved Exception:
Type = null
ModelAndView:
View name = null
View = null
Model = null
FlashMap:
Attributes = null
MockHttpServletResponse:
Status = 200
Error message = null
Headers = {Content-Type=[application/json;charset=UTF-8]}
Content type = application/json;charset=UTF-8
Body = {"id":"301c646a-bdc0-40e4-812e-16e3c83f37a3","code":"70421341-199","...........
我禁用了所有模拟日志 application.properties:
spring.test.mockmvc.print=none