java.lang.OutOfMemoryError: Java heap space

前端 未结 11 1250
温柔的废话
温柔的废话 2020-11-22 08:01

I am getting the following error on execution of a multi-threading program

java.lang.OutOfMemoryError: Java heap space

The above error occu

11条回答
  •  梦谈多话
    2020-11-22 08:58

    To avoid that exception, if you are using JUnit and Spring try adding this in every test class:

    @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
    

提交回复
热议问题