commit
3dc2934c51
@ -64,6 +64,7 @@ public class ShiroConfig {
|
|||||||
public SecurityManager securityManager() {
|
public SecurityManager securityManager() {
|
||||||
DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
|
DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
|
||||||
defaultWebSecurityManager.setRealm(baseShiroRealm());
|
defaultWebSecurityManager.setRealm(baseShiroRealm());
|
||||||
|
defaultWebSecurityManager.setRememberMeManager(null);
|
||||||
return defaultWebSecurityManager;
|
return defaultWebSecurityManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ public class AccountHandler {
|
|||||||
@Resource
|
@Resource
|
||||||
private UserMapper userMapper;
|
private UserMapper userMapper;
|
||||||
|
|
||||||
@Async
|
@Async("accountThreadPool")
|
||||||
@EventListener
|
@EventListener
|
||||||
public void processAccountLastOnlineTimeEvent(AccountEvent accountEvent) {
|
public void processAccountLastOnlineTimeEvent(AccountEvent accountEvent) {
|
||||||
userMapper.updateLastOnlineTimeByAccount(accountEvent.getAccount());
|
userMapper.updateLastOnlineTimeByAccount(accountEvent.getAccount());
|
||||||
|
@ -26,7 +26,7 @@ public class ArticleHandler {
|
|||||||
private LuceneService luceneService;
|
private LuceneService luceneService;
|
||||||
|
|
||||||
@EventListener
|
@EventListener
|
||||||
@Async
|
@Async("articlePostThreadPool")
|
||||||
public void processArticlePostEvent(ArticleEvent articleEvent) throws InterruptedException {
|
public void processArticlePostEvent(ArticleEvent articleEvent) throws InterruptedException {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
log.info(String.format("执行文章发布相关事件:[%s]", JSON.toJSONString(articleEvent)));
|
log.info(String.format("执行文章发布相关事件:[%s]", JSON.toJSONString(articleEvent)));
|
||||||
@ -56,7 +56,7 @@ public class ArticleHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventListener
|
@EventListener
|
||||||
@Async
|
@Async("articleDeleteThreadPool")
|
||||||
public void processArticleDeleteEvent(ArticleDeleteEvent articleDeleteEvent) throws InterruptedException {
|
public void processArticleDeleteEvent(ArticleDeleteEvent articleDeleteEvent) throws InterruptedException {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
log.info(String.format("执行文章删除相关事件:[%s]", JSON.toJSONString(articleDeleteEvent)));
|
log.info(String.format("执行文章删除相关事件:[%s]", JSON.toJSONString(articleDeleteEvent)));
|
||||||
|
@ -29,7 +29,7 @@ public class CommentHandler {
|
|||||||
@Resource
|
@Resource
|
||||||
private CommentMapper commentMapper;
|
private CommentMapper commentMapper;
|
||||||
|
|
||||||
@Async
|
@Async("commentThreadPool")
|
||||||
@EventListener
|
@EventListener
|
||||||
public void processCommentCreatedEvent(CommentEvent commentEvent) throws InterruptedException {
|
public void processCommentCreatedEvent(CommentEvent commentEvent) throws InterruptedException {
|
||||||
log.info(String.format("开始执行评论发布事件:[%s]", JSON.toJSONString(commentEvent)));
|
log.info(String.format("开始执行评论发布事件:[%s]", JSON.toJSONString(commentEvent)));
|
||||||
|
Loading…
Reference in New Issue
Block a user