Complete the move to constructor injection in configuration classes

This is a follow-on from the work done in 5009933. Now that SPR-14015
has been fixed, constructor injection can also be used for parameterised
dependencies, including optional dependencies that are injected via
an ObjectProvider.

Closes gh-5306
This commit is contained in:
Andy Wilkinson
2016-03-23 14:15:40 +00:00
parent cb2ad7fb87
commit 19d8c5e6f6
39 changed files with 705 additions and 415 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,10 +18,9 @@ package sample.devtools;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter;
@SpringBootApplication
public class SampleDevToolsApplication extends WebMvcAutoConfigurationAdapter {
public class SampleDevToolsApplication {
public static void main(String[] args) {
SpringApplication.run(SampleDevToolsApplication.class, args);