Small refactoring. Put the JPA stuff from coursecontroller and groupcontroller to post model