All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.hengyunabc.endpoints.autoconfigure2.ManagementApplicationcontextHolderConfiguration Maven / Gradle / Ivy

The newest version!
package io.github.hengyunabc.endpoints.autoconfigure2;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

@ManagementContextConfiguration
public class ManagementApplicationcontextHolderConfiguration {

	@Autowired
	private ConfigurableApplicationContext context;

	@PostConstruct
	public void init() {
		ManagementApplicationcontextHolder holder = context.getBean(ManagementApplicationcontextHolder.class);
		holder.setManagementApplicationContext(context);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy