mirror of
https://github.com/pcvolkmer/onkostar-plugin-dnpm.git
synced 2025-07-04 01:52:55 +00:00
Issue #11: Service und Spring Data JPA Repository für Systemeinstellungen
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
package DNPM.config;
|
||||
|
||||
import DNPM.database.SettingsRepository;
|
||||
import DNPM.services.*;
|
||||
import de.itc.onkostar.api.IOnkostarApi;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@ -15,6 +17,7 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = "DNPM.analyzer")
|
||||
@EnableJpaRepositories(basePackages = "DNPM.database")
|
||||
public class PluginConfiguration {
|
||||
|
||||
@Bean
|
||||
@ -28,8 +31,17 @@ public class PluginConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TherapieplanServiceFactory therapieplanServiceFactory(final IOnkostarApi onkostarApi, final FormService formService) {
|
||||
return new TherapieplanServiceFactory(onkostarApi, formService);
|
||||
public SettingsService settingsService(final SettingsRepository settingsRepository) {
|
||||
return new SettingsService(settingsRepository);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TherapieplanServiceFactory therapieplanServiceFactory(
|
||||
final IOnkostarApi onkostarApi,
|
||||
final SettingsService settingsService,
|
||||
final FormService formService
|
||||
) {
|
||||
return new TherapieplanServiceFactory(onkostarApi, settingsService, formService);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user