Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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