yl-backend/src/main/java/com/guwan/backend/config/EasyEsConfig.java

18 lines
668 B
Java

package com.guwan.backend.config;
import cn.easyes.starter.factory.IndexStrategyFactory;
import cn.easyes.starter.register.EsMapperScan;
import cn.easyes.starter.config.EasyEsConfigProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EsMapperScan("com.guwan.backend.elasticsearch.mapper")
@EnableConfigurationProperties(EasyEsConfigProperties.class)
public class EasyEsConfig {
@Bean
public IndexStrategyFactory indexStrategyFactory() {
return new IndexStrategyFactory();
}
}