2
안녕하세요 저는 스프링 부트 데이터 solr을 사용하여 solr에서 엔티티를 색인하려고합니다. 하지만 난solr exception 예상 mime 형식 application/octet-stream이 있지만 text/html이 있습니다.
public interface BookRepository extends SolrCrudRepository<Publishers, String> {
List<Publishers> findByName(String name);
}
내 기본 URL이 "http://localhost:8983/solr/portal"
입니다
@SolrDocument
public class Publishers {
@Id
@Field
private String advID;
@Field
private String name;
@Field
private String domain;
@Field("cat")
private String categories;
//getters and setters
}
내 저장소 인터페이스 내 게시자 클래스 예외
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/portal: 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/portal/publishers/update. Reason:
<pre> Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
</body>
</html>
을 이것은 무엇입니까. 내 주요 클래스 코드에 같은
@Resource BookRepository repository; @Override public void run(String... strings) throws Exception { this.repository.save(new Publishers("4", "Sony Playstation","none", null)); }
아래에 업데이트 된 엔티티 클래스 즉 Publishers
이름이 자동으로 URL에 추가되는 것을 나는 발견했다 . solr에 대한 호출을 보내는 동안 solr URL에 이름을 추가하지 않도록 응용 프로그램에 지시하는 방법을 모르겠습니다. 누구든지 나를 도울 수 있습니다. 미리 감사드립니다.
어디에서 예외가 발생합니까? – Zeromus
게시자 저장시 내 run()을 참조하십시오. –