Spring - private 메서드에 @Transactional이 적용될까?
·
Why?
배경 오늘도 어김없이 private 메서드에 @Transactional 애너테이션을 적용했는데 오늘따라 SonarLint가 눈에 띄었다. @Transactional private void createRoles(Member member) { List roles = authorityUtils.createRoles(member.getEmail()); if (roles.isEmpty()) { throw new BusinessLogicException(ExceptionCode.MEMBER_ROLE_DOES_NOT_EXISTS); } member.setRoles(roles); } Non-public methods should not be "@Transactional" Bug Major java:S2230 Marki..