This commit is contained in:
Danil Kornishev 2016-11-21 11:43:03 -05:00
parent a32db2581f
commit 2375eda92c
3 changed files with 28 additions and 37 deletions

View File

@ -14,11 +14,6 @@
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
<version>4.2.6.RELEASE</version> <version>4.2.6.RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,13 +1,12 @@
package com.baeldung.spring; package com.baeldung.spring;
import com.baeldung.spring.domain.Car;
import com.baeldung.spring.domain.Engine;
import com.baeldung.spring.domain.Transmission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import com.baeldung.spring.domain.Engine;
import com.baeldung.spring.domain.Transmission;
@Configuration @Configuration
@ComponentScan("com.baeldung.spring") @ComponentScan("com.baeldung.spring")
public class Config { public class Config {

View File

@ -3,9 +3,6 @@ package com.baeldung.spring.domain;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.inject.Inject;
import javax.inject.Named;
@Component @Component
public class Car { public class Car {
private Engine engine; private Engine engine;