참고URL:
https://dev-gyus.github.io/spring/2021/03/18/SpringSecurity-AccountLock-2.html
https://okky.kr/articles/616644
/**
* 삭제된 사용자 세션 날리기
* @param sqlSession
* @param params
*/
public void blockUser(@SqlRes(SID)SqlSession sqlSession, Map<String, String[]> params) {
List<String> delEmployeeList = new ArrayList<String>();
delEmployeeList = sqlSession.selectList("admin.employee_manage.getDeleteEmployee",params);
for (String delEmp : delEmployeeList) {
List<SessionInformation> sessionList = this.sessionRegistry.getAllSessions(delEmp, false);
for(SessionInformation session : sessionList) {
if(!session.isExpired()) {
session.expireNow();
}
}
}
}