Skip to content

Is there any way to reduce the handling time for the first request? #269

Answered by fugerit79
alantorviq asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, thanks for your question, you can try the eager initialization.

Here is an example with quarkus.

While here is a similar example with spring boot :

package org.fugerit.java.demo;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import org.fugerit.java.doc.base.config.InitHandler;

@Component
public class AppInit implements InitializingBean {

    @Autowired
    private Environment environment;

    @Autowired
    DocInit docInit;

    @Override
    public void afterPropertiesSet() throws Exception {
        /*

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alantorviq
Comment options

Answer selected by fugerit79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation
2 participants