Created
January 15, 2023 17:37
-
-
Save oofnivek/b2d7191f5f77ef7cbef1d3807af04572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import org.springframework.stereotype.Service; | |
@Service | |
public class BookService { | |
public Book getBookById(String id){ | |
try{ | |
// simulate slow retrieval from DB | |
Thread.sleep(2000); | |
}catch(Exception e){ | |
e.printStackTrace(); | |
} | |
return new Book(id, "Book " + id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment