-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'releases/release-0.8.0' into master
- Loading branch information
Showing
54 changed files
with
1,074 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
backend/src/main/java/ee/ria/riha/conf/StorageConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package ee.ria.riha.conf; | ||
|
||
import ee.ria.riha.domain.InfoSystemRepository; | ||
import ee.ria.riha.domain.RihaStorageInfoSystemRepository; | ||
import ee.ria.riha.storage.client.StorageClient; | ||
import ee.ria.riha.storage.domain.CommentRepository; | ||
import ee.ria.riha.storage.domain.FileRepository; | ||
import ee.ria.riha.storage.domain.MainResourceRepository; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
@Configuration | ||
public class StorageConfiguration { | ||
|
||
@Bean | ||
public StorageClient getStorageClient(RestTemplate restTemplate, ApplicationProperties applicationProperties) { | ||
return new StorageClient(restTemplate, applicationProperties.getStorageClient().getBaseUrl()); | ||
} | ||
|
||
@Bean | ||
public MainResourceRepository mainResourceRepository(StorageClient storageClient) { | ||
return new MainResourceRepository(storageClient); | ||
} | ||
|
||
@Bean | ||
public InfoSystemRepository infoSystemRepository(MainResourceRepository mainResourceRepository) { | ||
return new RihaStorageInfoSystemRepository(mainResourceRepository); | ||
} | ||
|
||
@Bean | ||
public CommentRepository commentRepository(StorageClient storageClient) { | ||
return new CommentRepository(storageClient); | ||
} | ||
|
||
@Bean | ||
public FileRepository fileRepository(RestTemplate restTemplate, ApplicationProperties applicationProperties) { | ||
return new FileRepository(restTemplate, applicationProperties.getStorageClient().getBaseUrl()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.