spring-cloud / spring-cloud-commons

Common classes used in different Spring Cloud implementations
Apache License 2.0
707 stars 704 forks source link

RestartListener is republishing ApplicationPreparedEvent #1248

Closed spencergibb closed 1 year ago

spencergibb commented 1 year ago

See original issue https://github.com/spring-projects/spring-boot/issues/35878

Spring Cloud Context needs the Application in a few places. Using a custom event handles those situations and fixes the OPs issue.

Spring Cloud Context has been doing this since the early days, so we are going to restrict the fix to 4.0+ in case anyone is, even if inadvertently, relying on this.