@Bean
    public DefaultLockRepository defaultLockRepository(final DataSource dataSource,
                                                       final ClusterProperties clusterProperties) {
        final String host = IpUtils.getHost();
        String fullPath = host + ":" + port;
        if (StringUtils.isNoneBlank(contextPath)) {
            fullPath += contextPath;
        }
        DefaultLockRepository defaultLockRepository = new DefaultLockRepository(dataSource, fullPath);
        defaultLockRepository.setPrefix("SHENYU_");
        // set lock ttl
        long millis = TimeUnit.SECONDS.toMillis(clusterProperties.getLockTtl());
        defaultLockRepository.setTimeToLive(Long.valueOf(millis).intValue());
        return defaultLockRepository;
    }
Shenyu Admin distributed lock by spring-integration-jdbc.

@param dataSource the dataSource
@param clusterProperties the cluster properties
@return  defaultLockRepository
shenyu-admin/src/main/java/org/apache/shenyu/admin/config/ClusterJdbcConfiguration.java