Commit e28ce56e authored by Quxl's avatar Quxl

x

parent c434d4ee
......@@ -2,7 +2,6 @@ package com.egolm.shop.config;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -10,13 +9,12 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public class SolrConfig {
@Value("${solr.goods.core-url}")
private String houseUrl;
@Value("${solr.baseURL}")
private String baseUrl;
@Bean
@Qualifier("goodsSolrClient")
public HttpSolrClient getHouseHttpSolrClient() {
return new Builder().withBaseSolrUrl(houseUrl).build();
public HttpSolrClient getHttpSolrClient() {
return new Builder().withBaseSolrUrl(baseUrl).build();
}
}
......@@ -5,7 +5,6 @@ import java.util.stream.Collectors;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......@@ -16,11 +15,10 @@ import com.egolm.shop.schedules.AbstractSolrApi;
public class GoodsCollectTask extends AbstractSolrApi{
@Autowired
JdbcTemplate jdbcTemplate;
private JdbcTemplate jdbcTemplate;
@Autowired
@Qualifier("solrClient")
HttpSolrClient solrClient;
private HttpSolrClient solrClient;
@Value("${solr.goods.offset-minute-for-day}")
private Long offsetMinuteForDay;
......
......@@ -6,7 +6,7 @@ maven.build.timestamp=@maven.build.timestamp@
sql.house.create-index-query= sql/goods/create-index-query.sql
sql.house.delete-index-query= sql/goods/delete-index-query.sql
sql.house.update-index-query= sql/goods/update-index-query.sql
solr.house.core-url= http://10.10.0.15:8983/solr/house
solr.house.core-url= http://10.10.0.15:8983/solr/goods
solr.house.offset-minute-for-day: 1500
solr.house.offset-minute-for-minute: 10
solr.house.cron-for-day: 0 0 3 * * ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment