Question Details

No question body available.

Tags

java spring-boot maven

Answers (1)

April 26, 2026 Score: 5 Rep: 487 Quality: Low Completeness: 50%

The issue is that your BookServiceImpl class needs to implement the BookService interface. Right now, Spring can't find a bean of type BookService because your implementation class isn't connected to the interface.

Add implements BookService.

@Service
public class BookServiceImpl implements BookService {  // ⬅️
    private final BookRepository bookRepository;

public BookServiceImpl(BookRepository bookRepository) { this.bookRepository = bookRepository; }

// ... rest of your code }