working copy of controller
working variant of controller with JPA connection