Home > Java > javaTutorial > body text

How to solve the problem that the interface developed using springboot is very slow when accessed for the first time

王林
Release: 2023-05-17 19:22:04
forward
2502 people have browsed it

1, jdk changes startup parameters

Open the file $JAVA_PATH/jre/lib/security/java.security (in the directory where you installed jdk) and find the following content :

  securerandom.source=file:/dev/random

    Replace it with:

  securerandom.source=file:/dev/./urandom

2, Set dispatcherServlet for instant loading

spring:
mvc:
servlet:
load-on-startup: 1

3, Set the number of initialization links in the database connection pool

spring:

datasource:

hikari:

minimum-idle: 10

The above is the detailed content of How to solve the problem that the interface developed using springboot is very slow when accessed for the first time. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!