File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/main/java/com/github/springfox/loader/controller Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1515import org .springframework .web .servlet .support .ServletUriComponentsBuilder ;
1616import org .springframework .web .util .UriComponents ;
1717
18- import javax .annotation .PostConstruct ;
1918import javax .servlet .http .HttpServletRequest ;
2019import java .io .IOException ;
2120
2524@ ConditionalOnProperty (value = SpringfoxLoaderProps .PROPS_SPRINGFOX_ENDPOINTS , havingValue = "true" )
2625public class SpringfoxLoaderController {
2726
28- private RestTemplate restTemplate ;
27+ private RestTemplate restTemplate = new RestTemplate () ;
2928 private HttpHeaders headers ;
3029
31- @ PostConstruct
32- public void init () {
30+ public SpringfoxLoaderController () {
3331 headers = new HttpHeaders ();
3432 headers .put (HttpHeaders .ACCESS_CONTROL_ALLOW_ORIGIN , Lists .newArrayList ("*" ));
35- restTemplate = new RestTemplate ();
3633 }
3734
3835 @ GetMapping ("/api-docs" )
You can’t perform that action at this time.
0 commit comments