Skip to content

Commit 565a116

Browse files
xamcrosspedja4
authored andcommitted
BAEL-2070 (eugenp#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
1 parent 89e8d66 commit 565a116

5 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.baeldung.dependency.exception.app;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.context.annotation.ComponentScan;
6+
7+
@SpringBootApplication
8+
@ComponentScan(basePackages = "com.baeldung.dependency.exception")
9+
public class CustomConfiguration {
10+
public static void main(String[] args) {
11+
SpringApplication.run(CustomConfiguration.class, args);
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.baeldung.dependency.exception.app;
2+
3+
import com.baeldung.dependency.exception.repository.InventoryRepository;
4+
import org.springframework.stereotype.Service;
5+
6+
@Service
7+
public class PurchaseDeptService {
8+
private InventoryRepository repository;
9+
10+
public PurchaseDeptService(InventoryRepository repository) {
11+
this.repository = repository;
12+
}
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.baeldung.dependency.exception.repository;
2+
3+
import org.springframework.context.annotation.Primary;
4+
import org.springframework.stereotype.Repository;
5+
6+
@Primary
7+
@Repository
8+
public class DressRepository implements InventoryRepository {
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.baeldung.dependency.exception.repository;
2+
3+
import org.springframework.stereotype.Repository;
4+
5+
@Repository
6+
public interface InventoryRepository {
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.baeldung.dependency.exception.repository;
2+
3+
import org.springframework.stereotype.Repository;
4+
5+
@Repository
6+
public class ShoeRepository implements InventoryRepository {
7+
}

0 commit comments

Comments
 (0)