BAEL-2070 (#5064)
* BAEL-2070 UnsatisfiedDependencyException example app * [BAEL-8456] - Moved Java Date articles into a new module - 'java-dates' * BAEL-2070 Refactoring; Replaced field injection with constructor injection * fix package, fix get random node * update neo4j * fix formatting * [BAEL-8456] - Moved more articles into 'java-dates' module * BAEL-2070 Small indentation fix
This commit is contained in:
parent
89e8d66def
commit
565a11620b
@ -0,0 +1,13 @@
|
||||
package com.baeldung.dependency.exception.app;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = "com.baeldung.dependency.exception")
|
||||
public class CustomConfiguration {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CustomConfiguration.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.baeldung.dependency.exception.app;
|
||||
|
||||
import com.baeldung.dependency.exception.repository.InventoryRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class PurchaseDeptService {
|
||||
private InventoryRepository repository;
|
||||
|
||||
public PurchaseDeptService(InventoryRepository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.baeldung.dependency.exception.repository;
|
||||
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Primary
|
||||
@Repository
|
||||
public class DressRepository implements InventoryRepository {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.baeldung.dependency.exception.repository;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface InventoryRepository {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.baeldung.dependency.exception.repository;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class ShoeRepository implements InventoryRepository {
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user