Skip to content

Commit

Permalink
SHIBUI-2003
Browse files Browse the repository at this point in the history
adding missing annotation to listeners
  • Loading branch information
chasegawa committed Aug 9, 2021
1 parent b546768 commit 1d2ec05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import javax.persistence.PostPersist;
import javax.persistence.PostUpdate;

import org.springframework.beans.factory.annotation.Autowired;

import edu.internet2.tier.shibboleth.admin.ui.security.model.Group;
import edu.internet2.tier.shibboleth.admin.ui.security.model.Ownership;
import edu.internet2.tier.shibboleth.admin.ui.security.repository.OwnershipRepository;
Expand All @@ -16,6 +18,7 @@ public class GroupUpdatedEntityListener implements ILazyLoaderHelper {
/**
* @see https://stackoverflow.com/questions/12155632/injecting-a-spring-dependency-into-a-jpa-entitylistener
*/
@Autowired
public void init(OwnershipRepository repo) {
GroupUpdatedEntityListener.ownershipRepository = repo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.persistence.PostPersist;
import javax.persistence.PostUpdate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

Expand All @@ -23,6 +24,7 @@ public class UserUpdatedEntityListener implements ILazyLoaderHelper {
/**
* @see https://stackoverflow.com/questions/12155632/injecting-a-spring-dependency-into-a-jpa-entitylistener
*/
@Autowired
public void init(OwnershipRepository repo, GroupsRepository groupRepo) {
UserUpdatedEntityListener.ownershipRepository = repo;
UserUpdatedEntityListener.groupRepository = groupRepo;
Expand Down

0 comments on commit 1d2ec05

Please sign in to comment.