File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
main/java/no/ssb/klass/api/services
test/java/no/ssb/klass/api/applicationtest/config Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,18 @@ public class IndexServiceImpl implements IndexService {
5959 private final ClassificationSeriesRepository classificationRepository ;
6060 private final OpenSearchRestTemplate elasticsearchOperations ;
6161 private final DocumentMapper documentMapper ;
62- private final IndexService indexService ;
62+
63+ @ Autowired
64+ @ Lazy
65+ private IndexService indexService ;
6366
6467 @ Autowired
6568 public IndexServiceImpl (
6669 ClassificationSeriesRepository classificationRepository ,
67- OpenSearchRestTemplate elasticsearchOperations , IndexService indexService ) {
70+ OpenSearchRestTemplate elasticsearchOperations ) {
6871 this .classificationRepository = classificationRepository ;
6972 this .elasticsearchOperations = elasticsearchOperations ;
7073 this .documentMapper = new DocumentMapper ();
71- this .indexService = indexService ;
7274 }
7375
7476 private IndexCoordinates getIndexCoordinates () {
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ public OpenSearchRestTemplate openSearchRestTemplate(org.opensearch.client.RestH
2020 @ Primary
2121 public IndexService indexService (ClassificationSeriesRepository seriesRepository ,
2222 OpenSearchRestTemplate openSearchRestTemplate ) {
23- return new IndexServiceImpl (seriesRepository , openSearchRestTemplate , null );
23+ return new IndexServiceImpl (seriesRepository , openSearchRestTemplate );
2424 }
2525}
You can’t perform that action at this time.
0 commit comments