Skip to content

Commit 7c07d15

Browse files
committed
Move backoffice backend DI out of config folder
1 parent 2fdbcd5 commit 7c07d15

File tree

16 files changed

+57
-55
lines changed

16 files changed

+57
-55
lines changed

src/apps/backoffice/backend/config/dependency-injection/Shared/application.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
services:
22

33
Backoffice.courses.BackofficeCourseRepository:
4-
class: ../../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/MongoBackofficeCourseRepository
4+
class: ../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/MongoBackofficeCourseRepository
55
arguments: ['@Shared.MongoConnectionManager']
66

77
Backoffice.courses.BackofficeCourseRepositoryElastic:
8-
class: ../../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/ElasticBackofficeCourseRepository
8+
class: ../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/ElasticBackofficeCourseRepository
99
arguments: ['@Shared.ElasticConnectionManager']
1010

1111
Backoffice.courses.CoursesFinder:
12-
class: ../../../../../../Contexts/Backoffice/Courses/application/SearchAll/CoursesFinder
12+
class: ../../../../../Contexts/Backoffice/Courses/application/SearchAll/CoursesFinder
1313
arguments: ['@Backoffice.courses.BackofficeCourseRepository']
1414

1515
Backoffice.courses.SearchAllCoursesQueryHandler:
16-
class: ../../../../../../Contexts/Backoffice/Courses/application/SearchAll/SearchAllCoursesQueryHandler
16+
class: ../../../../../Contexts/Backoffice/Courses/application/SearchAll/SearchAllCoursesQueryHandler
1717
arguments: ['@Backoffice.courses.CoursesFinder']
1818
tags:
1919
- { name: 'queryHandler' }
2020

2121
Backoffice.courses.BackofficeCourseCreator:
22-
class: ../../../../../../Contexts/Backoffice/Courses/application/Create/BackofficeCourseCreator
22+
class: ../../../../../Contexts/Backoffice/Courses/application/Create/BackofficeCourseCreator
2323
arguments: ['@Backoffice.courses.BackofficeCourseRepository']
2424

2525
Backoffice.courses.CreateBackofficeCourseOnCourseCreated:
26-
class: ../../../../../../Contexts/Backoffice/Courses/application/Create/CreateBackofficeCourseOnCourseCreated
26+
class: ../../../../../Contexts/Backoffice/Courses/application/Create/CreateBackofficeCourseOnCourseCreated
2727
arguments: ['@Backoffice.courses.BackofficeCourseCreator']
2828
tags:
2929
- { name: 'domainEventSubscriber' }
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
services:
2+
Shared.Logger:
3+
class: ../../../../../Contexts/Shared/infrastructure/WinstonLogger
4+
arguments: []
5+
6+
Shared.MongoConnectionManager:
7+
factory:
8+
class: ../../../../../Contexts/Shared/infrastructure/persistence/mongo/MongoClientFactory
9+
method: 'createClient'
10+
arguments: ['mooc', '@Apps.Backoffice.Backend.MongoConfig']
11+
12+
Shared.ElasticConnectionManager:
13+
factory:
14+
class: ../../../../../Contexts/Shared/infrastructure/persistence/elasticsearch/ElasticClientFactory
15+
method: 'createClient'
16+
arguments: ['mooc', '@Apps.Backoffice.Backend.ElasticConfig']
17+
18+
Shared.QueryHandlersInformation:
19+
class: ../../../../../Contexts/Shared/infrastructure/QueryBus/QueryHandlersInformation
20+
arguments: ['!tagged queryHandler']
21+
22+
Shared.QueryBus:
23+
class: ../../../../../Contexts/Shared/infrastructure/QueryBus/InMemoryQueryBus
24+
arguments: ['@Shared.QueryHandlersInformation']
25+
26+
Shared.EventBus:
27+
class: ../../../../../Contexts/Shared/infrastructure/EventBus/InMemorySyncEventBus
28+
arguments: []
29+
30+
Shared.EventBus.DomainEventMapping:
31+
class: ../../../../../Contexts/Shared/infrastructure/EventBus/DomainEventMapping
32+
arguments: ['!tagged domainEventSubscriber']
33+
34+
Shared.EventBus.DomainEventJsonDeserializer:
35+
class: ../../../../../Contexts/Shared/infrastructure/EventBus/DomainEventJsonDeserializer
36+
arguments: ['@Shared.EventBus.DomainEventMapping']

src/apps/backoffice/backend/config/dependency-injection/application_test.yaml renamed to src/apps/backoffice/backend/dependency-injection/application_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ imports:
33

44
services:
55
Backoffice.Backend.EnvironmentArranger:
6-
class: ../../../../../../tests/Contexts/Shared/infrastructure/mongo/MongoEnvironmentArranger
6+
class: ../../../../../tests/Contexts/Shared/infrastructure/mongo/MongoEnvironmentArranger
77
arguments: ['@Shared.MongoConnectionManager']
88

99
Backoffice.Backend.ElasticEnvironmentArranger:
10-
class: ../../../../../../tests/Contexts/Shared/infrastructure/elastic/ElasticEnvironmentArranger
10+
class: ../../../../../tests/Contexts/Shared/infrastructure/elastic/ElasticEnvironmentArranger
1111
arguments: ['@Shared.ElasticConnectionManager']
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
services:
22
Apps.Backoffice.Backend.MongoConfig:
33
factory:
4-
class: ../../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/BackofficeMongoConfigFactory
4+
class: ../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/BackofficeMongoConfigFactory
55
method: 'createConfig'
66

77
Apps.Backoffice.Backend.ElasticConfig:
88
factory:
9-
class: ../../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/BackofficeElasticConfigFactory
9+
class: ../../../../../Contexts/Backoffice/Courses/infrastructure/persistence/BackofficeElasticConfigFactory
1010
method: 'createConfig'
1111

1212
Apps.Backoffice.Backend.controllers.StatusGetController:
13-
class: ../../../controllers/StatusGetController
13+
class: ../../controllers/StatusGetController
1414
arguments: []
1515

1616
Apps.Backoffice.Backend.controllers.CoursesGetController:
17-
class: ../../../controllers/CoursesGetController
17+
class: ../../controllers/CoursesGetController
1818
arguments: ['@Shared.QueryBus']

0 commit comments

Comments
 (0)