1

有没有办法在 spring-boot 限制 junit 的日志?下面是我的结果JSONAssert.assertEquals,因为尺寸body太大而无法在控制台显示,我得到java.lang.OutOfMemoryError: Java heap space

顺便说一下,我不能增加 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","...........
4

1 回答 1

1

我禁用了所有模拟日志

应用程序属性:

spring.test.mockmvc.print=none
于 2018-06-12T08:13:34.800 回答