然后在Google浏览器搜索了一下(已翻墙),搜索需用英文,类似问题看来不是个例呀,甚至JDK bug列表汇中就有相似的bug,如JDK-6521844 : SecureRandom hangs on Linux Systems,但这些bug都标记为fixed。但明显没有完全fix掉啊。然后继续找,原来
Avoiding JVM Delays Caused by Random Number Generation
然后仔细看application.xml 配置,其实当时也没设置什么东西 ,于是一项一项的注释,效率上还是没变化,我就试了试新建一个项目,然后把 html 都拿过去。
问题解决了!! 速度 非常快
好家伙,我直接好家伙,我查了几天的问题,居然可能是在依赖上。
最后结论 :应该是某一个依赖项有问题导致的,或者版本本身不对劲
有空再去看看2.3.4 的 底层tomcat配置有什么不同
有问题的配置
4.0.0org.springframework.bootspring-boot-starter-parent2.3.4.RELEASEcom.tianluntianlunpc0.0.1-SNAPSHOTtianlunpcDemo project for Spring Boot1.8org.springframework.bootspring-boot-starter-data-jpaorg.springframework.bootspring-boot-starter-thymeleaforg.springframework.bootspring-boot-starter-webmysqlmysql-connector-javaruntimeorg.projectlomboklomboktrueorg.springframework.bootspring-boot-starter-testtestorg.junit.vintagejunit-vintage-engineorg.springframework.sessionspring-session-jdbcorg.springframework.bootspring-boot-devtoolstrueorg.springframework.bootspring-boot-maven-plugin
没问题的配置
4.0.0com.tianluntianlinpc0.0.1-SNAPSHOTtianlinpcDemo project for Spring Boot1.8UTF-8UTF-82.3.7.RELEASEorg.springframework.bootspring-boot-starter-data-jpaorg.springframework.bootspring-boot-starter-thymeleaforg.springframework.bootspring-boot-starter-webcommons-iocommons-io2.6org.springframework.sessionspring-session-coremysqlmysql-connector-javaruntimeorg.springframework.bootspring-boot-devtoolstrueorg.projectlomboklomboktrueorg.springframework.bootspring-boot-starter-testtestorg.junit.vintagejunit-vintage-engineorg.springframework.bootspring-boot-dependencies${spring-boot.version}pomimportorg.apache.maven.pluginsmaven-compiler-plugin3.8.11.81.8UTF-8org.springframework.bootspring-boot-maven-plugin2.3.7.RELEASEcom.tianlun.tianlunpc.TianlinpcApplicationrepackagerepackage