Tag Archives: Java interview questions

Outofmemoryerror: GC overhead limit exceeded solution

When developing Java projects with idea, the service starts with a memory overflow error

Error:java : java.lang.OutOfMemoryError : GC overhead limit exceeded

This error indicates that the memory is not enough during startup. Just set the memory value of idea’s startup process heap to a larger value.
Setting window: settings — & gt; build, execution, deployment — & gt; complier
increase the value of build process heap size
as shown in the figure below:

 

Change 700 in the box to 1000 and restart the service.

Mybatis batch insert data

Due to the project need to generate more data, and saved to the database, in the program encapsulates a List collection objects, then need to put the collection of entities in the inserted into the database, the project USES the Spring + MyBatis, therefore intends to use the MyBatis bulk insert, should be better than that of circular insert, because before used bulk insert, finally achieved after got some information on the Internet, stick process in detail. For future reference and study.
Java code:

Java code: