No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This project creates functional bean definitions from Spring Boot autoconfigurations. It’s really (surprisingly) fast.

To use it include the library on your classpath:


Create your Spring Boot application as an ApplicationContextInitializer and register beans in the initialize() method, e.g.

public class AutoApplication
		implements ApplicationContextInitializer<GenericApplicationContext> {

	public String home() {
		return "Hello";

	public void initialize(GenericApplicationContext context) {
		context.registerBean(AutoApplication.class, () -> this);


then use the custom SpringApplication class from this library instead of the default one to launch your app, as normal:

	public static void main(String[] args) throws Exception {, args);

Instead of using an ApplicationContextInitializer you can use the regular @SpringBootApplication and @Configuration programming model in your own classes, and set spring.functional.enabled=true (e.g. as a System property). Be sure to use the custom SpringApplication class though if you do that.

For integration tests use the test context loader from this library. E.g:

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@ContextConfiguration(classes = AutoApplication.class, loader = AutoTestContextLoader.class)
public class AutoApplicationTests {

	private WebTestClient rest;

	public void contextLoads() {


Unsupported: test slices (@WebMvcTest etc.) and @AutoConfigure* annotations in tests.