Closed bilinxing closed 2 years ago
@tangyang9464 @seriouszyx @elfisworking @fangzhengjin
@bilinxing plz use English, thanks!
@fangzhengjin any comments?
you can replace the original MessageListenerAdapter with your own
@Configuration
public class jCasbinConfiguration {
public final static String CASBIN_POLICY_TOPIC = "YOUR_CUSTOMER_TOPIC";
public jCasbinConfiguration(
RedisMessageListenerContainer redisMessageListenerContainer,
MessageListenerAdapter listenerAdapter
) {
redisMessageListenerContainer.removeMessageListener(listenerAdapter);
redisMessageListenerContainer.addMessageListener(listenerAdapter, new ChannelTopic(CASBIN_POLICY_TOPIC));
}
}
@bilinxing
How to import java redis watcher: https://github.com/jcasbin/redis-watcher