title: why my springboot app cant see @Service annotation?
body: <p>My service class</p>
  
  <pre><code>package poklakni.library.service;
  import java.util.List;
  import java.util.function.Predicate;
  import org.springframework.stereotype.Service;
  import poklakni.library.entity.Book;
  
  @Service
  public interface BookService {
  
      //some crud methods
  }
  </code></pre>
  
  <p>main class</p>
  
  <pre><code>package poklakni.library;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import poklakni.library.repository.BookRepository;
  import poklakni.library.repository.PersonRepository;
  import poklakni.library.service.BookService;
  import poklakni.library.service.PersonService;
  
  @SpringBootApplication
  public class Application implements CommandLineRunner {
  
      @Autowired
      private BookService bookService;
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  
      @Override
      public void run(String... args) throws Exception {
  
          //more code
      }
  }
  </code></pre>
  
  <p>it says this</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  Description:
  
  Field bookService in poklakni.library.Application required a bean of type 
  'poklakni.library.service.BookService' that could not be found.
  
  Action:
  
  Consider defining a bean of type 'poklakni.library.service.BookService' in 
  your configuration.
  </code></pre>
  
  <p>even if i add @ComponentScan ("poklakni.library") it doesnt work</p>
  
  <p>i have also repo with @Repository annotation and it autowries it perfectly
  but service doesnt work
  what am I doing wrong? 
  thank u for any advice</p>
  
  <p>EDIT: there is also a implementation of service
      package poklakni.library.service;</p>
  
  <pre><code>import java.util.List;
  import java.util.function.Predicate;
  import java.util.stream.Collectors;
  
  import org.springframework.beans.factory.annotation.Autowired;
  
  import poklakni.library.entity.Book;
  import poklakni.library.repository.BookRepository;
  import poklakni.library.repository.PersonRepository;
  
  public class BookServiceImpl implements BookService {
  
      @Autowired
      private BookRepository bookRepo;
  
      //more code
  }
  </code></pre>