Удалил использование PersonSetting
This commit is contained in:
parent
084f39be0b
commit
ef605cf098
4
pom.xml
4
pom.xml
@ -19,8 +19,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<godfather.version>0.0.59</godfather.version>
|
||||
<telegram.bot.version>0.0.60</telegram.bot.version>
|
||||
<godfather.version>0.0.63</godfather.version>
|
||||
<telegram.bot.version>0.0.63</telegram.bot.version>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||
<plugin.maven.compiler.ver>3.10.1</plugin.maven.compiler.ver>
|
||||
|
@ -2,7 +2,6 @@ package dev.struchkov.godfather.telegram.starter.config;
|
||||
|
||||
import dev.struchkov.godfather.main.domain.content.ChatMail;
|
||||
import dev.struchkov.godfather.main.domain.content.Mail;
|
||||
import dev.struchkov.godfather.simple.context.repository.StorylineRepository;
|
||||
import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository;
|
||||
import dev.struchkov.godfather.simple.context.service.ErrorHandler;
|
||||
import dev.struchkov.godfather.simple.context.service.EventDispatching;
|
||||
@ -88,29 +87,25 @@ public class TelegramBotAutoconfiguration {
|
||||
}
|
||||
|
||||
@Bean("mailStorylineService")
|
||||
@ConditionalOnBean(value = {UnitPointerService.class, StorylineRepository.class, PersonUnitConfiguration.class})
|
||||
@ConditionalOnBean(value = {UnitPointerService.class, PersonUnitConfiguration.class})
|
||||
public StorylineService<Mail> mailStorylineService(
|
||||
UnitPointerService unitPointerService,
|
||||
StorylineRepository storylineRepository,
|
||||
List<PersonUnitConfiguration> personUnitConfigurations
|
||||
) {
|
||||
return new StorylineMailService<>(
|
||||
unitPointerService,
|
||||
storylineRepository,
|
||||
new ArrayList<>(personUnitConfigurations)
|
||||
);
|
||||
}
|
||||
|
||||
@Bean("chatMailStorylineService")
|
||||
@ConditionalOnBean(value = {UnitPointerService.class, StorylineRepository.class, ChatUnitConfiguration.class})
|
||||
@ConditionalOnBean(value = {UnitPointerService.class, ChatUnitConfiguration.class})
|
||||
public StorylineService<ChatMail> chatMailStorylineService(
|
||||
UnitPointerService unitPointerService,
|
||||
StorylineRepository storylineRepository,
|
||||
List<ChatUnitConfiguration> chatUnitConfigurations
|
||||
) {
|
||||
return new StorylineMailService<>(
|
||||
unitPointerService,
|
||||
storylineRepository,
|
||||
new ArrayList<>(chatUnitConfigurations)
|
||||
);
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
package dev.struchkov.godfather.telegram.starter.config;
|
||||
|
||||
import dev.struchkov.godfather.simple.context.repository.PersonSettingRepository;
|
||||
import dev.struchkov.godfather.simple.context.repository.StorylineContext;
|
||||
import dev.struchkov.godfather.simple.context.repository.StorylineRepository;
|
||||
import dev.struchkov.godfather.simple.context.repository.StorylineHistoryRepository;
|
||||
import dev.struchkov.godfather.simple.context.repository.UnitPointerRepository;
|
||||
import dev.struchkov.godfather.simple.core.service.StorylineContextMapImpl;
|
||||
import dev.struchkov.godfather.simple.data.repository.impl.PersonSettingLocalRepository;
|
||||
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapRepository;
|
||||
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapHistoryRepository;
|
||||
import dev.struchkov.godfather.simple.data.repository.impl.UnitPointLocalRepository;
|
||||
import dev.struchkov.godfather.telegram.simple.context.repository.SenderRepository;
|
||||
import dev.struchkov.godfather.telegram.simple.context.service.TelegramConnect;
|
||||
@ -28,18 +26,12 @@ public class TelegramBotDataConfiguration {
|
||||
return new UnitPointLocalRepository();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(TelegramConnect.class)
|
||||
@ConditionalOnMissingBean(PersonSettingRepository.class)
|
||||
public PersonSettingRepository personSettingRepository() {
|
||||
return new PersonSettingLocalRepository();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(TelegramConnect.class)
|
||||
@ConditionalOnMissingBean(StorylineRepository.class)
|
||||
public StorylineRepository storylineRepository() {
|
||||
return new StorylineMapRepository();
|
||||
@ConditionalOnMissingBean(StorylineHistoryRepository.class)
|
||||
public StorylineHistoryRepository storylineHistoryRepository() {
|
||||
return new StorylineMapHistoryRepository();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
Loading…
x
Reference in New Issue
Block a user