parent
7dd91c9310
commit
045afd2f75
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.15.2/jackson-dataformat-yaml-2.15.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.15.2/jackson-dataformat-yaml-2.15.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.15.2/jackson-dataformat-yaml-2.15.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.code.findbugs:jsr305:3.0.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.errorprone:error_prone_annotations:2.3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.guava:failureaccess:1.0.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.guava:guava:29.0-jre">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/guava/29.0-jre/guava-29.0-jre-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/guava/29.0-jre/guava-29.0-jre-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.j2objc:j2objc-annotations:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-codec-dns:4.1.94.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-codec-dns/4.1.94.Final/netty-codec-dns-4.1.94.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-codec-dns/4.1.94.Final/netty-codec-dns-4.1.94.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-codec-dns/4.1.94.Final/netty-codec-dns-4.1.94.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-resolver-dns:4.1.94.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-resolver-dns/4.1.94.Final/netty-resolver-dns-4.1.94.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-resolver-dns/4.1.94.Final/netty-resolver-dns-4.1.94.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/netty/netty-resolver-dns/4.1.94.Final/netty-resolver-dns-4.1.94.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: io.reactivex.rxjava3:rxjava:3.1.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/reactivex/rxjava3/rxjava/3.1.6/rxjava-3.1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/reactivex/rxjava3/rxjava/3.1.6/rxjava-3.1.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/io/reactivex/rxjava3/rxjava/3.1.6/rxjava-3.1.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: javax.cache:cache-api:1.1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/javax/cache/cache-api/1.1.1/cache-api-1.1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/javax/cache/cache-api/1.1.1/cache-api-1.1.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/javax/cache/cache-api/1.1.1/cache-api-1.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.checkerframework:checker-qual:2.11.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.jboss.marshalling:jboss-marshalling:2.0.10.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling/2.0.10.Final/jboss-marshalling-2.0.10.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling/2.0.10.Final/jboss-marshalling-2.0.10.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling/2.0.10.Final/jboss-marshalling-2.0.10.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.jboss.marshalling:jboss-marshalling-river:2.0.10.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling-river/2.0.10.Final/jboss-marshalling-river-2.0.10.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling-river/2.0.10.Final/jboss-marshalling-river-2.0.10.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jboss/marshalling/jboss-marshalling-river/2.0.10.Final/jboss-marshalling-river-2.0.10.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.jodd:jodd-bean:5.1.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-bean/5.1.6/jodd-bean-5.1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-bean/5.1.6/jodd-bean-5.1.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-bean/5.1.6/jodd-bean-5.1.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.jodd:jodd-core:5.1.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-core/5.1.6/jodd-core-5.1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-core/5.1.6/jodd-core-5.1.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/jodd/jodd-core/5.1.6/jodd-core-5.1.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.redisson:redisson:3.14.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/redisson/redisson/3.14.1/redisson-3.14.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/redisson/redisson/3.14.1/redisson-3.14.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../../../Maven/repository/org/redisson/redisson/3.14.1/redisson-3.14.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,31 @@
|
||||
package com.xht.springboot.Config;
|
||||
|
||||
import org.redisson.Redisson;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.redisson.config.Config;
|
||||
import org.redisson.config.SingleServerConfig;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class RedissionConfig {
|
||||
/*@Value("#{spring.data.redis.host}")
|
||||
String address;
|
||||
@Value("#{spring.data.redis.port}")
|
||||
String port;
|
||||
@Value("#{spring.data.redis.password}")
|
||||
String pwd;*/
|
||||
@Bean
|
||||
public RedissonClient redissonClient(){
|
||||
Config config = new Config();
|
||||
|
||||
SingleServerConfig singleServerConfig = config.useSingleServer();
|
||||
singleServerConfig.setAddress("redis://192.168.225.128:6390")
|
||||
.setPassword("molong")
|
||||
.setDatabase(0);
|
||||
|
||||
RedissonClient redissonClient = Redisson.create(config);
|
||||
return redissonClient;
|
||||
}
|
||||
}
|
@ -1,18 +1,32 @@
|
||||
package com.xht.springboot;
|
||||
|
||||
import com.xht.springboot.Utils.BloomFilterUtils;
|
||||
import com.xht.springboot.pythonspider.PythonSpider;
|
||||
import org.python.google.common.hash.BloomFilter;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableCaching
|
||||
public class SpringbootApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringbootApplication.class, args);
|
||||
ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringbootApplication.class, args);
|
||||
|
||||
BloomFilterUtils bloomFilterUtils = applicationContext.getBean(BloomFilterUtils.class);
|
||||
RedisTemplate redisTemplate = (RedisTemplate) applicationContext.getBean("redisTemplate");
|
||||
Set<String> keys = redisTemplate.keys("*");
|
||||
System.out.println("BloomFilter: insert data");
|
||||
for(String key : keys){
|
||||
bloomFilterUtils.putIntoBloomFilter(key);
|
||||
System.out.println(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.xht.springboot.Utils;
|
||||
|
||||
import com.google.common.hash.BloomFilter;
|
||||
import com.google.common.hash.Funnels;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@Component
|
||||
public class BloomFilterUtils {
|
||||
private int bloomFilterSize = 10000;
|
||||
private double fpp = 0.3;
|
||||
private BloomFilter<String> bloomFilter = BloomFilter.create(Funnels.stringFunnel(StandardCharsets.UTF_8),bloomFilterSize,fpp);
|
||||
|
||||
public boolean putIntoBloomFilter(String key){
|
||||
return bloomFilter.put(key);
|
||||
}
|
||||
|
||||
public boolean queryKey(String key){
|
||||
return bloomFilter.mightContain(key);
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.xht.springboot.Utils;
|
||||
|
||||
public class MyLock {
|
||||
}
|
Loading…
Reference in new issue