spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Displaying progress of startup in the browser

Open nurkiewicz opened this issue 11 years ago • 18 comments

I did a proof of concept of showing startup progress in Spring Boot web applications. A few people asked to add such feature to Spring Boot, so I'm opening this ticket to figure out if it's reasonable feature. Closing this ticket with a resolution "*no-one needs this and Spring Boot starts too fast anyway" is acceptable ;-). If you find this an interesting feature, here are issues to consider:

  • turned off by default, enabled using configuration option
  • portable solution (currently supports only Tomcat with proprietary Valve implementaion). However I couldn't get servlet filters to work, they started intercepting requests way too late during startup
  • configure which URL patterns display the progress HTML page. During startup we still want to return 503 for web-services, Actuator endpoints, etc. This must be highly configurable
  • customizable progress page (template, steps, stylesheets, etc.)
  • No RxJava dependency (currently required)
  • Avoid static methods

More: current implementation and screencast.

nurkiewicz avatar Sep 19 '15 17:09 nurkiewicz

Thanks @nurkiewicz! I did read your article and it's a neat solution.

I'm a little concerned that merging this into the mainline might be adding complexity and code that not everyone needs. I'll mark it as waiting-for-votes and see what the general consensus is.

Cheers!

philwebb avatar Sep 21 '15 17:09 philwebb

This is pretty slick! I can't say that I totally need it, and i'm not sure it's worth the amount of support to generalize it and maintain it across multiple servers... but if it did end up getting included, i'd definitely use it in dev/test/qa

madorb avatar Sep 29 '15 15:09 madorb

:+1:

depressiveRobot avatar Sep 30 '15 10:09 depressiveRobot

:+1:

okohub avatar Sep 30 '15 10:09 okohub

:+1:

ikolomiets avatar Sep 30 '15 15:09 ikolomiets

:+1:

ghost avatar Sep 30 '15 20:09 ghost

+1

holgerstolzenberg avatar Oct 01 '15 07:10 holgerstolzenberg

Looks nice but wouldn't it be possible to encapsulate this in a single module/starter not cluttering up "spring-boot-core"?

joshiste avatar Oct 01 '15 08:10 joshiste

This would fit perfect into the actuator starter package.

depressiveRobot avatar Oct 01 '15 12:10 depressiveRobot

+1

pwielgolaski avatar Oct 01 '15 18:10 pwielgolaski

I see a lot of +1's but I'm quite nervous about adding this to spring-boot core jar. I don't think it fits in spring-boot-actuator either. It really feels like it should exist in a different module altogether.

On top of that I have the feeling that people will want to switch this on or off depending on the environment. Perhaps it makes sense in development but not production?

@nurkiewicz Are you interested in developing this outside of the mainline codebase? Perhaps it would be possible to extract the functionality and use some custom auto-configuration so that anyone could drop-in the jar to add it to their own app. That would also allow the issues you mentioned in the first comment to be ironed out. If you need more extension points we could certainly add them.

philwebb avatar Oct 01 '15 18:10 philwebb

+1

fkowal avatar Jan 19 '16 18:01 fkowal

@nurkiewicz I am also in favor of creating a 3rd party starter for that. Would you be willing to do that?

snicoll avatar Jan 20 '16 08:01 snicoll

Yes, I will try to prepare such when time permits. Some changes are needed in Spring Boot to expose certain APIs.

2016-01-20 9:59 GMT+01:00 Stéphane Nicoll [email protected]:

@nurkiewicz https://github.com/nurkiewicz I am also in favor of creating a 3rd party starter for that. Would you be willing to do that?

— Reply to this email directly or view it on GitHub https://github.com/spring-projects/spring-boot/issues/3990#issuecomment-173134061 .

Tomasz Nurkiewicz http://nurkiewicz.com

nurkiewicz avatar Jan 20 '16 09:01 nurkiewicz

+1

sta-szek avatar Nov 16 '16 13:11 sta-szek

+1

acabra85 avatar Feb 15 '17 13:02 acabra85

We've had a few votes for this but my feeling remains that this is something we shouldn't add to the core of Boot. If specific extensions are needed in Boot to allow this to be developed by a third-party, we'll happily add them.

philwebb avatar Mar 01 '17 23:03 philwebb

+1

conorgriffin avatar Mar 13 '17 20:03 conorgriffin