Commit 688805e7 by yangchen

更新config文件

parent 16ae4b25
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>com.zhiwei</groupId> <modelVersion>4.0.0</modelVersion>
<artifactId>weibohotcrawler</artifactId> <groupId>com.zhiwei</groupId>
<version>0.0.1-SNAPSHOT</version> <artifactId>weibohotcrawler</artifactId>
<name>weibohotcrawler</name> <version>0.0.1-SNAPSHOT</version>
<description>微博热搜1小时榜单,社会、热点采集程序</description> <name>weibohotcrawler</name>
<description>微博热搜1小时榜单,社会、热点采集程序</description>
<dependencies>
<dependency>
<groupId>com.zhiwei.middleware</groupId>
<artifactId>rsid-client</artifactId>
<version>0.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.6</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.8.3</version>
</dependency>
<dependencies>
<dependency>
<groupId>com.zhiwei.middleware</groupId>
<artifactId>rsid-client</artifactId>
<version>0.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.zhiwei.weibo4j</groupId>
<artifactId>weibo4jutil</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>com.zhiwei</groupId> <groupId>javax.mail</groupId>
<artifactId>weibobusiness</artifactId> <artifactId>mail</artifactId>
<version>0.0.5-SNAPSHOT</version> <version>1.4.7</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zhiwei</groupId> <groupId>junit</groupId>
<artifactId>zhiweiTools</artifactId> <artifactId>junit</artifactId>
<version>0.0.6-SNAPSHOT</version> <version>3.8.1</version>
</dependency> <scope>test</scope>
</dependencies> </dependency>
<!-- 打包管理 --> <dependency>
<build> <groupId>org.apache.httpcomponents</groupId>
<plugins> <artifactId>httpcore</artifactId>
<!-- 发布源码 --> <version>4.4.6</version>
<plugin> </dependency>
<artifactId>maven-source-plugin</artifactId> <dependency>
<version>2.4</version> <groupId>org.apache.httpcomponents</groupId>
<configuration> <artifactId>httpclient</artifactId>
<attach>true</attach> <version>4.5.3</version>
</configuration> </dependency>
<executions> <dependency>
<execution> <groupId>org.jsoup</groupId>
<phase>compile</phase> <artifactId>jsoup</artifactId>
<goals> <version>1.8.3</version>
<goal>jar</goal> </dependency>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<!-- 解决maven test命令时console出现中文乱码乱码 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<dependency>
<groupId>com.zhiwei</groupId>
<artifactId>weibobusiness</artifactId>
<version>0.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.zhiwei</groupId>
<artifactId>zhiweiTools</artifactId>
<version>0.0.6-SNAPSHOT</version>
</dependency>
</dependencies>
<!-- 打包管理 -->
<build>
<plugins>
<!-- 发布源码 -->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<!-- 解决maven test命令时console出现中文乱码乱码 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<!-- 分发管理:管理distribution和supporting files -->
<distributionManagement>
<snapshotRepository>
<id>nexus-releases</id>
<name>User Porject Snapshot</name>
<url>http://192.168.0.30:8081/nexus/content/repositories/snapshots/</url>
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
<repository>
<id>nexus-releases</id>
<name>User Porject Release</name>
<url>http://192.168.0.30:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
<!-- 分发管理:管理distribution和supporting files -->
<distributionManagement>
<snapshotRepository>
<id>nexus-releases</id>
<name>User Porject Snapshot</name>
<url>http://192.168.0.30:8081/nexus/content/repositories/snapshots/</url>
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
<repository>
<id>nexus-releases</id>
<name>User Porject Release</name>
<url>http://192.168.0.30:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
</project> </project>
\ No newline at end of file
...@@ -8,13 +8,13 @@ public class Config { ...@@ -8,13 +8,13 @@ public class Config {
Properties conf = null; Properties conf = null;
try { try {
InputStream is = Thread.currentThread().getContextClassLoader() InputStream is = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("rsidClient.properties"); .getResourceAsStream("rsid.properties");
conf = new Properties(); conf = new Properties();
conf.load(is); conf.load(is);
is.close(); is.close();
rsidUrl = conf.getProperty("rsidUrl"); rsidUrl = conf.getProperty("zookeeper");
rsidGroup = conf.getProperty("rsidGroup"); rsidGroup = conf.getProperty("group");
redisWeiboKey = conf.getProperty("redisWeiboKey"); redisWeiboKey = conf.getProperty("rsidType");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -19,6 +19,7 @@ public class GetData { ...@@ -19,6 +19,7 @@ public class GetData {
* @Description 启动采集程序 * @Description 启动采集程序
* @param token * @param token
*/ */
public static void start(String token){ public static void start(String token){
new DataCrawlerStart().start(); new DataCrawlerStart().start();
DataUpdate dataUpdate = new DataUpdate(token); DataUpdate dataUpdate = new DataUpdate(token);
......
rsidUrl = zookeeper://192.168.0.234:2181
rsidGroup = rsidserver
redisWeiboKey = weibo
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment