Created
August 22, 2020 06:55
-
-
Save takahashi-h5/b3414b84d970fab1e4800f9ad1b0fa01 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
@PersistenceContext() | |
private EntityManager entityManager; | |
@RequestMapping(path = "/test", method = RequestMethod.GET) | |
public ResponseEntity<?> test() { | |
var ret = entityManager.createQuery("from Employee", Employee.class).getResultList(); | |
return ResponseEntity.ok(Map.of("result", ret)); | |
} | |
// windows | |
// curl -X GET http://localhost:8080/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment