admin
2021-03-02 f8bebca93fcaf37a7564b066b0f1b6dc1e7a5551
SolrJ升级
2个文件已修改
25 ■■■■ 已修改文件
pom.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/java/com/hxh/spring/test/SolrTest.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -12,7 +12,7 @@
        <org.hibernate.version>4.1.2</org.hibernate.version>
        <org.springframework-version>4.3.0.RELEASE</org.springframework-version>
        <spring.mongodb.version>1.10.10.RELEASE</spring.mongodb.version>
        <solrj.version>4.10.4</solrj.version>
        <solrj.version>8.6.0</solrj.version>
        <logback.version>1.2.3</logback.version>
    </properties>
@@ -534,12 +534,6 @@
            <version>4.3.5</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.solr/solr-solrj -->
        <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr-solrj</artifactId>
            <version>8.7.0</version>
        </dependency>
src/test/java/com/hxh/spring/test/SolrTest.java
@@ -9,6 +9,11 @@
import com.yeshi.buwan.iqiyi.util.IqiyiUtil;
import com.yeshi.buwan.service.imp.VideoInfoService;
import com.yeshi.buwan.service.manager.SolrAlbumDataManager;
import org.apache.http.auth.Credentials;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.common.util.NamedList;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.data.solr.server.support.HttpSolrClientFactory;
@@ -18,6 +23,7 @@
import org.springframework.test.context.web.WebAppConfiguration;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;
@@ -50,7 +56,18 @@
    @Test
    public void addSolrAlbum() {
        solrDataManager.syncAlbum("8224447");
        SolrClient solrClient=new SolrClient() {
            @Override
            public NamedList<Object> request(SolrRequest solrRequest, String s) throws SolrServerException, IOException {
                return null;
            }
            @Override
            public void close() throws IOException {
            }
        };
        Credentials credentials=new Credentials();
        HttpSolrClientFactory factory=new HttpSolrClientFactory();
    }