潘志宝
2024-11-21 d338b50afd6504a9676f0a26b3ecbcc844483e7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.iailab.framework.lock4j.config;
 
import com.iailab.framework.lock4j.core.DefaultLockFailureStrategy;
import com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
 
@AutoConfiguration(before = LockAutoConfiguration.class)
@ConditionalOnClass(name = "com.baomidou.lock.annotation.Lock4j")
public class IailabLock4jConfiguration {
 
    @Bean
    public DefaultLockFailureStrategy lockFailureStrategy() {
        return new DefaultLockFailureStrategy();
    }
 
}