Commit 355860fd authored by Andy Wilkinson's avatar Andy Wilkinson

Remove @Autowired from constructors where class has single constructor

Closes gh-5226
parent 3ca67e66
/* /*
* Copyright 2014-2015 the original author or authors. * Copyright 2014-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -21,8 +21,6 @@ import java.io.File; ...@@ -21,8 +21,6 @@ import java.io.File;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
/** /**
* A {@link HealthIndicator} that checks available disk space and reports a status of * A {@link HealthIndicator} that checks available disk space and reports a status of
* {@link Status#DOWN} when it drops below a configurable threshold. * {@link Status#DOWN} when it drops below a configurable threshold.
...@@ -41,7 +39,6 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator { ...@@ -41,7 +39,6 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {
* Create a new {@code DiskSpaceHealthIndicator}. * Create a new {@code DiskSpaceHealthIndicator}.
* @param properties the disk space properties * @param properties the disk space properties
*/ */
@Autowired
public DiskSpaceHealthIndicator(DiskSpaceHealthIndicatorProperties properties) { public DiskSpaceHealthIndicator(DiskSpaceHealthIndicatorProperties properties) {
this.properties = properties; this.properties = properties;
} }
......
...@@ -116,7 +116,6 @@ public class AuthenticationManagerConfiguration { ...@@ -116,7 +116,6 @@ public class AuthenticationManagerConfiguration {
private final SecurityProperties securityProperties; private final SecurityProperties securityProperties;
@Autowired
SpringBootAuthenticationConfigurerAdapter(SecurityProperties securityProperties) { SpringBootAuthenticationConfigurerAdapter(SecurityProperties securityProperties) {
this.securityProperties = securityProperties; this.securityProperties = securityProperties;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -78,7 +78,6 @@ public class OAuth2ResourceServerConfiguration { ...@@ -78,7 +78,6 @@ public class OAuth2ResourceServerConfiguration {
private ResourceServerProperties resource; private ResourceServerProperties resource;
@Autowired
public ResourceSecurityConfigurer(ResourceServerProperties resource) { public ResourceSecurityConfigurer(ResourceServerProperties resource) {
this.resource = resource; this.resource = resource;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -114,7 +114,6 @@ public class SecurityFilterAutoConfigurationEarlyInitializationTests { ...@@ -114,7 +114,6 @@ public class SecurityFilterAutoConfigurationEarlyInitializationTests {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Autowired
public JacksonModuleBean(DeserializerBean myDeser) { public JacksonModuleBean(DeserializerBean myDeser) {
addDeserializer(SourceType.class, myDeser); addDeserializer(SourceType.class, myDeser);
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package sample.cache; ...@@ -19,7 +19,6 @@ package sample.cache;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -31,7 +30,6 @@ public class CacheManagerCheck implements CommandLineRunner { ...@@ -31,7 +30,6 @@ public class CacheManagerCheck implements CommandLineRunner {
private final CacheManager cacheManager; private final CacheManager cacheManager;
@Autowired
public CacheManagerCheck(CacheManager cacheManager) { public CacheManagerCheck(CacheManager cacheManager) {
this.cacheManager = cacheManager; this.cacheManager = cacheManager;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -20,7 +20,6 @@ import java.util.Arrays; ...@@ -20,7 +20,6 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -54,7 +53,6 @@ class SampleClient { ...@@ -54,7 +53,6 @@ class SampleClient {
private final Random random; private final Random random;
@Autowired
public SampleClient(CountryRepository countryService) { public SampleClient(CountryRepository countryService) {
this.countryService = countryService; this.countryService = countryService;
this.random = new Random(); this.random = new Random();
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package sample.data.jpa.service; ...@@ -19,7 +19,6 @@ package sample.data.jpa.service;
import sample.data.jpa.domain.City; import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary; import sample.data.jpa.domain.HotelSummary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -35,7 +34,6 @@ class CityServiceImpl implements CityService { ...@@ -35,7 +34,6 @@ class CityServiceImpl implements CityService {
private final HotelRepository hotelRepository; private final HotelRepository hotelRepository;
@Autowired
public CityServiceImpl(CityRepository cityRepository, public CityServiceImpl(CityRepository cityRepository,
HotelRepository hotelRepository) { HotelRepository hotelRepository) {
this.cityRepository = cityRepository; this.cityRepository = cityRepository;
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -27,7 +27,6 @@ import sample.data.jpa.domain.RatingCount; ...@@ -27,7 +27,6 @@ import sample.data.jpa.domain.RatingCount;
import sample.data.jpa.domain.Review; import sample.data.jpa.domain.Review;
import sample.data.jpa.domain.ReviewDetails; import sample.data.jpa.domain.ReviewDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -42,7 +41,6 @@ class HotelServiceImpl implements HotelService { ...@@ -42,7 +41,6 @@ class HotelServiceImpl implements HotelService {
private final ReviewRepository reviewRepository; private final ReviewRepository reviewRepository;
@Autowired
public HotelServiceImpl(HotelRepository hotelRepository, public HotelServiceImpl(HotelRepository hotelRepository,
ReviewRepository reviewRepository) { ReviewRepository reviewRepository) {
this.hotelRepository = hotelRepository; this.hotelRepository = hotelRepository;
...@@ -71,7 +69,7 @@ class HotelServiceImpl implements HotelService { ...@@ -71,7 +69,7 @@ class HotelServiceImpl implements HotelService {
@Override @Override
public Review addReview(Hotel hotel, ReviewDetails details) { public Review addReview(Hotel hotel, ReviewDetails details) {
Review review = new Review(hotel, 1, details); Review review = new Review(hotel, 1, details);
return reviewRepository.save(review); return this.reviewRepository.save(review);
} }
@Override @Override
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package sample.hateoas.web; ...@@ -19,7 +19,6 @@ package sample.hateoas.web;
import sample.hateoas.domain.Customer; import sample.hateoas.domain.Customer;
import sample.hateoas.domain.CustomerRepository; import sample.hateoas.domain.CustomerRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.EntityLinks; import org.springframework.hateoas.EntityLinks;
import org.springframework.hateoas.ExposesResourceFor; import org.springframework.hateoas.ExposesResourceFor;
import org.springframework.hateoas.Resource; import org.springframework.hateoas.Resource;
...@@ -42,7 +41,6 @@ public class CustomerController { ...@@ -42,7 +41,6 @@ public class CustomerController {
private final EntityLinks entityLinks; private final EntityLinks entityLinks;
@Autowired
public CustomerController(CustomerRepository repository, EntityLinks entityLinks) { public CustomerController(CustomerRepository repository, EntityLinks entityLinks) {
this.repository = repository; this.repository = repository;
this.entityLinks = entityLinks; this.entityLinks = entityLinks;
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package sample.jersey; ...@@ -19,7 +19,6 @@ package sample.jersey;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Component @Component
...@@ -28,7 +27,6 @@ public class Endpoint { ...@@ -28,7 +27,6 @@ public class Endpoint {
private Service service; private Service service;
@Autowired
public Endpoint(Service service) { public Endpoint(Service service) {
this.service = service; this.service = service;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -25,7 +25,6 @@ import org.jooq.Query; ...@@ -25,7 +25,6 @@ import org.jooq.Query;
import org.jooq.Record; import org.jooq.Record;
import org.jooq.Result; import org.jooq.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.RowMapper;
...@@ -41,7 +40,6 @@ public class JooqExamples implements CommandLineRunner { ...@@ -41,7 +40,6 @@ public class JooqExamples implements CommandLineRunner {
private final JdbcTemplate jdbc; private final JdbcTemplate jdbc;
@Autowired
public JooqExamples(DSLContext dsl, JdbcTemplate jdbc) { public JooqExamples(DSLContext dsl, JdbcTemplate jdbc) {
this.dsl = dsl; this.dsl = dsl;
this.jdbc = jdbc; this.jdbc = jdbc;
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -18,7 +18,6 @@ package sample.atomikos; ...@@ -18,7 +18,6 @@ package sample.atomikos;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -30,7 +29,6 @@ public class AccountService { ...@@ -30,7 +29,6 @@ public class AccountService {
private final AccountRepository accountRepository; private final AccountRepository accountRepository;
@Autowired
public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) { public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) {
this.jmsTemplate = jmsTemplate; this.jmsTemplate = jmsTemplate;
this.accountRepository = accountRepository; this.accountRepository = accountRepository;
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -18,7 +18,6 @@ package sample.bitronix; ...@@ -18,7 +18,6 @@ package sample.bitronix;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -30,7 +29,6 @@ public class AccountService { ...@@ -30,7 +29,6 @@ public class AccountService {
private final AccountRepository accountRepository; private final AccountRepository accountRepository;
@Autowired
public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) { public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) {
this.jmsTemplate = jmsTemplate; this.jmsTemplate = jmsTemplate;
this.accountRepository = accountRepository; this.accountRepository = accountRepository;
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package sample.jndi; package sample.jndi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -29,7 +28,6 @@ public class AccountService { ...@@ -29,7 +28,6 @@ public class AccountService {
private final AccountRepository accountRepository; private final AccountRepository accountRepository;
@Autowired
public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) { public AccountService(JmsTemplate jmsTemplate, AccountRepository accountRepository) {
this.jmsTemplate = jmsTemplate; this.jmsTemplate = jmsTemplate;
this.accountRepository = accountRepository; this.accountRepository = accountRepository;
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package sample.jndi; package sample.jndi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -27,7 +26,6 @@ public class WebController { ...@@ -27,7 +26,6 @@ public class WebController {
private final AccountRepository repository; private final AccountRepository repository;
@Autowired
public WebController(AccountService service, AccountRepository repository) { public WebController(AccountService service, AccountRepository repository) {
this.service = service; this.service = service;
this.repository = repository; this.repository = repository;
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package sample.groovytemplates.mvc; package sample.groovytemplates.mvc;
import java.util.HashMap; import java.util.HashMap;
...@@ -23,7 +24,6 @@ import javax.validation.Valid; ...@@ -23,7 +24,6 @@ import javax.validation.Valid;
import sample.groovytemplates.Message; import sample.groovytemplates.Message;
import sample.groovytemplates.MessageRepository; import sample.groovytemplates.MessageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError; import org.springframework.validation.FieldError;
...@@ -38,9 +38,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; ...@@ -38,9 +38,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@Controller @Controller
@RequestMapping("/") @RequestMapping("/")
public class MessageController { public class MessageController {
private final MessageRepository messageRepository; private final MessageRepository messageRepository;
@Autowired
public MessageController(MessageRepository messageRepository) { public MessageController(MessageRepository messageRepository) {
this.messageRepository = messageRepository; this.messageRepository = messageRepository;
} }
......
/* /*
* 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 * Licensed under the Apache License, Version 2.0 (the "License");
* the License. You may obtain a copy of the License at * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * Unless required by applicable law or agreed to in writing, software
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * distributed under the License is distributed on an "AS IS" BASIS,
* specific language governing permissions and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package sample.web.ui.mvc; package sample.web.ui.mvc;
...@@ -18,7 +21,6 @@ import javax.validation.Valid; ...@@ -18,7 +21,6 @@ import javax.validation.Valid;
import sample.web.ui.Message; import sample.web.ui.Message;
import sample.web.ui.MessageRepository; import sample.web.ui.MessageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
...@@ -35,9 +37,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; ...@@ -35,9 +37,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@Controller @Controller
@RequestMapping("/") @RequestMapping("/")
public class MessageController { public class MessageController {
private final MessageRepository messageRepository; private final MessageRepository messageRepository;
@Autowired
public MessageController(MessageRepository messageRepository) { public MessageController(MessageRepository messageRepository) {
this.messageRepository = messageRepository; this.messageRepository = messageRepository;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference; ...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.handler.TextWebSocketHandler;
...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler { ...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler {
private final AtomicReference<String> messagePayload; private final AtomicReference<String> messagePayload;
@Autowired
public SimpleClientWebSocketHandler(GreetingService greetingService, public SimpleClientWebSocketHandler(GreetingService greetingService,
CountDownLatch latch, AtomicReference<String> message) { CountDownLatch latch, AtomicReference<String> message) {
this.greetingService = greetingService; this.greetingService = greetingService;
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package samples.websocket.jetty.echo; ...@@ -19,7 +19,6 @@ package samples.websocket.jetty.echo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketHandler;
...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler { ...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler {
private final EchoService echoService; private final EchoService echoService;
@Autowired
public EchoWebSocketHandler(EchoService echoService) { public EchoWebSocketHandler(EchoService echoService) {
this.echoService = echoService; this.echoService = echoService;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference; ...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.handler.TextWebSocketHandler;
...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler { ...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler {
private final AtomicReference<String> messagePayload; private final AtomicReference<String> messagePayload;
@Autowired
public SimpleClientWebSocketHandler(GreetingService greetingService, public SimpleClientWebSocketHandler(GreetingService greetingService,
CountDownLatch latch, AtomicReference<String> message) { CountDownLatch latch, AtomicReference<String> message) {
this.greetingService = greetingService; this.greetingService = greetingService;
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package samples.websocket.tomcat.echo; ...@@ -19,7 +19,6 @@ package samples.websocket.tomcat.echo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketHandler;
...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler { ...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler {
private final EchoService echoService; private final EchoService echoService;
@Autowired
public EchoWebSocketHandler(EchoService echoService) { public EchoWebSocketHandler(EchoService echoService) {
this.echoService = echoService; this.echoService = echoService;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference; ...@@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.handler.TextWebSocketHandler;
...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler { ...@@ -37,7 +36,6 @@ public class SimpleClientWebSocketHandler extends TextWebSocketHandler {
private final AtomicReference<String> messagePayload; private final AtomicReference<String> messagePayload;
@Autowired
public SimpleClientWebSocketHandler(GreetingService greetingService, public SimpleClientWebSocketHandler(GreetingService greetingService,
CountDownLatch latch, AtomicReference<String> message) { CountDownLatch latch, AtomicReference<String> message) {
this.greetingService = greetingService; this.greetingService = greetingService;
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,7 +19,6 @@ package samples.websocket.undertow.echo; ...@@ -19,7 +19,6 @@ package samples.websocket.undertow.echo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketHandler;
...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler { ...@@ -35,7 +34,6 @@ public class EchoWebSocketHandler extends TextWebSocketHandler {
private final EchoService echoService; private final EchoService echoService;
@Autowired
public EchoWebSocketHandler(EchoService echoService) { public EchoWebSocketHandler(EchoService echoService) {
this.echoService = echoService; this.echoService = echoService;
} }
......
/* /*
* Copyright 2012-2014 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -30,7 +30,6 @@ import org.jdom2.xpath.XPathExpression; ...@@ -30,7 +30,6 @@ import org.jdom2.xpath.XPathExpression;
import org.jdom2.xpath.XPathFactory; import org.jdom2.xpath.XPathFactory;
import sample.ws.service.HumanResourceService; import sample.ws.service.HumanResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ws.server.endpoint.annotation.Endpoint; import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot; import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload; import org.springframework.ws.server.endpoint.annotation.RequestPayload;
...@@ -46,7 +45,6 @@ public class HolidayEndpoint { ...@@ -46,7 +45,6 @@ public class HolidayEndpoint {
private HumanResourceService humanResourceService; private HumanResourceService humanResourceService;
@Autowired
public HolidayEndpoint(HumanResourceService humanResourceService) public HolidayEndpoint(HumanResourceService humanResourceService)
throws JDOMException, XPathFactoryConfigurationException, throws JDOMException, XPathFactoryConfigurationException,
XPathExpressionException { XPathExpressionException {
......
...@@ -18,7 +18,6 @@ package org.springframework.boot.logging; ...@@ -18,7 +18,6 @@ package org.springframework.boot.logging;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -50,7 +49,6 @@ public class LoggingApplicationListenerIntegrationTests { ...@@ -50,7 +49,6 @@ public class LoggingApplicationListenerIntegrationTests {
private final LoggingSystem loggingSystem; private final LoggingSystem loggingSystem;
@Autowired
SampleService(LoggingSystem loggingSystem) { SampleService(LoggingSystem loggingSystem) {
this.loggingSystem = loggingSystem; this.loggingSystem = loggingSystem;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment