Solr Expected mime type application/octet-stream but got text/html. 异常

weixin_38054293 2019-07-24 11:23:30
我搭建了一套 Solr5.5.5 的环境  spring-data-solr也是5.5.5版本  使用的是内置的服务器运行的,控制台操控solr正常但是,集成到Springboot后疯狂报错! 控制台截图如下: springboot环境如下: <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>   配置文件如下: #application.properties 并不是yml格式,不知道有没有影响
spring.data.solr.host=http://127.0.0.1:8983/solr/new_core 代码如下 @Autowired
private SolrClient solrClient public class ArticleViewServiceImplimplements ArticleViewService {
    @Override
    public List<Article> testSolr() throws IOException, SolrServerException {
        SolrQuery solrQuery = new SolrQuery();         solrQuery.set("q","id:34306219391547cc8f817c08bae95177");
        QueryResponse query = solrClient.query(solrQuery);
        for (SolrDocument result : query.getResults()) {
            System.out.println(result.get("new_title"));
        }
        return null;
    }
} 启动报错信息如下(启动报错)   2019-07-24 10:48:26.038 [RMI TCP Connection(5)-10.0.101.76] WARN  o.s.boot.actuate.health.SolrHealthIndicator - Health check failed org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:8983/solr/new_core: Expected mime type application/octet-stream but got text/html. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/new_core/admin/cores. Reason: <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/> </body> </html> 大佬们,谢谢大佬们 
...全文
725 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38085655 2019-07-25
  • 打赏
  • 举报
回复
springboot吧? 调整你的boot版本就可以了. 
weixin_38071599 2019-07-25
  • 打赏
  • 举报
回复
顶一下

477

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧