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