title: Parameter 0 of constructor in ..... Spring Boot
body: <p>I have a problem when launch my app. Could somebody help me to solve this issue?</p>
  
  <pre><code>Parameter 0 of constructor in com.journaldev.elasticsearch.service.BookServiceImpl required a bean of type 'com.journaldev.elasticsearch.dao.search.BookRepositorySearch' that could not be found.
  Action:
  Consider defining a bean of type 'com.journaldev.elasticsearch.dao.search.BookRepositorySearch' in your configuration.
  </code></pre>
  
  <p><strong>GenericRepository</strong></p>
  
  <pre><code>public interface GenericRepository&lt;T, K&gt; {
    Map&lt;String, Object&gt; get(final K id);
  }
  </code></pre>
  
  <p><strong>GenericRepositoryImpl</strong></p>
  
  <pre><code>public class GenericRepositoryImpl&lt;T, K extends Serializable&gt; implements GenericRepository&lt;T, K&gt; { 
  
    private RestHighLevelClient restHighLevelClient;
  
    private ObjectMapper objectMapper;
  
    public GenericRepositoryImpl(ObjectMapper objectMapper, RestHighLevelClient restHighLevelClient) {
      this.objectMapper = objectMapper;
      this.restHighLevelClient = restHighLevelClient;
    }
  
    @Override
    public Map&lt;String, Object&gt; get(K id) {
      return null;
    }
  }
  </code></pre>
  
  <p><strong>BookRepositorySearch</strong> </p>
  
  <pre><code>@Component
  public interface BookRepositorySearch extends GenericRepository&lt;Book, Long&gt; {}
  </code></pre>
  
  <p><strong>BookService</strong> </p>
  
  <pre><code>public interface BookService {
    Map&lt;String, Object&gt; get(final Long id);    
  }
  </code></pre>
  
  <p><strong>BookServiceImpl</strong> </p>
  
  <pre><code>@Service
  public class BookServiceImpl implements BookService {
  
    private final BookRepositorySearch bookRepositorySearch;
  
    public BookServiceImpl(BookRepositorySearch bookRepositorySearch) {
      this.bookRepositorySearch = bookRepositorySearch;
    }      
    @Override
    public Map&lt;String, Object&gt; get(Long id) {
      return null;
    }
  }
  </code></pre>