Skip to content

Skip lazy initialization of beans that explicitly set the lazy attribute to false #16184

@jhaeyaert

Description

@jhaeyaert

Hi,

The suspected issue described below is related to the version 2.2.0.M1 of Spring Boot.

It appears that the management endpoints are not reachable when using the new lazy initialization feature with actuator endpoints exposed on another port than the default one.

Steps to reproduce :

  • Create a new project from spring initializr with the new Spring Boot 2.2.0.M1 version
  • Add Reactive Web and Actuator dependencies
  • Set the properties management.server.port=8081 and spring.main.lazy-initialization=true

Hit the endpoint http://localhost:8081/actuator/health and you'll get a connection refused.

Switch off the lazy initialization and the actuator endpoints will be back again.
Note that actuator endpoints are working correctly if I switch on the lazy initialization and do not change the management port.

Is something I didn't understand or is there a little bug in the lazy initialization feature ?

By the way, thank you for this feature that I have been waiting for a long time!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions