由于用的是jetty启动方式: 在Eclipse ->run -arguments 中的VM arguments 中输入-Xms1g -Xmx5g这个参数就可以了。 -Xms1g 表示最小内存1g,-Xmx5g表示最大内存5g、