Displaying progress of startup in the browser
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
Valveimplementaion). 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
staticmethods
More: current implementation and screencast.
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!
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
:+1:
:+1:
:+1:
:+1:
+1
Looks nice but wouldn't it be possible to encapsulate this in a single module/starter not cluttering up "spring-boot-core"?
This would fit perfect into the actuator starter package.
+1
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.
+1
@nurkiewicz I am also in favor of creating a 3rd party starter for that. Would you be willing to do that?
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
+1
+1
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.
+1