Skip to content

Commit 6f533c6

Browse files
committed
init
0 parents  commit 6f533c6

File tree

9 files changed

+618
-0
lines changed

9 files changed

+618
-0
lines changed

.gitignore

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# https://github.com/github/gitignore/blob/master/Java.gitignore
2+
3+
*.class
4+
5+
# Mobile Tools for Java (J2ME)
6+
.mtj.tmp/
7+
8+
# Package Files #
9+
*.jar
10+
*.war
11+
*.ear
12+
13+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
14+
hs_err_pid*
15+
16+
/.project
17+
18+
19+
# https://github.com/github/gitignore/blob/master/Maven.gitignore
20+
target/
21+
pom.xml.tag
22+
pom.xml.releaseBackup
23+
pom.xml.versionsBackup
24+
pom.xml.next
25+
release.properties
26+
dependency-reduced-pom.xml
27+
buildNumber.properties
28+
.mvn/timing.properties
29+
30+
31+
# https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore
32+
33+
.metadata
34+
bin/
35+
tmp/
36+
*.tmp
37+
*.bak
38+
*.swp
39+
*~.nib
40+
local.properties
41+
.settings/
42+
.loadpath
43+
.recommenders
44+
45+
# Eclipse Core
46+
.project
47+
48+
# External tool builders
49+
.externalToolBuilders/
50+
51+
# Locally stored "Eclipse launch configurations"
52+
*.launch
53+
54+
# PyDev specific (Python IDE for Eclipse)
55+
*.pydevproject
56+
57+
# CDT-specific (C/C++ Development Tooling)
58+
.cproject
59+
60+
# JDT-specific (Eclipse Java Development Tools)
61+
.classpath
62+
63+
# Java annotation processor (APT)
64+
.factorypath
65+
66+
# PDT-specific (PHP Development Tools)
67+
.buildpath
68+
69+
# sbteclipse plugin
70+
.target
71+
72+
# Tern plugin
73+
.tern-project
74+
75+
# TeXlipse plugin
76+
.texlipse
77+
78+
# STS (Spring Tool Suite)
79+
.springBeans
80+
81+
# Code Recommenders
82+
.recommenders/
83+
84+
85+
# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
86+
87+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
88+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
89+
90+
# User-specific stuff:
91+
.idea/workspace.xml
92+
.idea/tasks.xml
93+
.idea/dictionaries
94+
.idea/vcs.xml
95+
.idea/jsLibraryMappings.xml
96+
97+
# Sensitive or high-churn files:
98+
.idea/dataSources.ids
99+
.idea/dataSources.xml
100+
.idea/dataSources.local.xml
101+
.idea/sqlDataSources.xml
102+
.idea/dynamic.xml
103+
.idea/uiDesigner.xml
104+
105+
# Gradle:
106+
.idea/gradle.xml
107+
.idea/libraries
108+
109+
# Mongo Explorer plugin:
110+
.idea/mongoSettings.xml
111+
112+
## File-based project format:
113+
*.iws
114+
115+
## Plugin-specific files:
116+
117+
# IntelliJ
118+
/out/
119+
120+
# mpeltonen/sbt-idea plugin
121+
.idea_modules/
122+
123+
# JIRA plugin
124+
atlassian-ide-plugin.xml
125+
126+
# Crashlytics plugin (for Android Studio and IntelliJ)
127+
com_crashlytics_export_strings.xml
128+
crashlytics.properties
129+
crashlytics-build.properties
130+
fabric.properties
131+
132+
133+
# zeroturnaround
134+
rebel.xml
135+
136+
137+
# log
138+
log/
139+
logs/
140+
141+
142+
# IntelliJ IDEA
143+
*.iml
144+
.idea/
145+

pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>org.springframework.boot</groupId>
8+
<artifactId>spring-boot-starter-parent</artifactId>
9+
<version>1.5.6.RELEASE</version>
10+
</parent>
11+
<groupId>com.github.binarywang</groupId>
12+
<artifactId>weixin-java-open-demo</artifactId>
13+
<version>1.0-SNAPSHOT</version>
14+
<packaging>jar</packaging>
15+
16+
<name>spring-boot-demo-for-wechat-open</name>
17+
<description>Spring Boot Demo with wechat Open</description>
18+
19+
<properties>
20+
<weixin-java-open.version>2.8.7.BETA</weixin-java-open.version>
21+
22+
<maven.compiler.source>1.8</maven.compiler.source>
23+
<maven.compiler.target>1.8</maven.compiler.target>
24+
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
25+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
26+
<project.build.locales>zh_CN</project.build.locales>
27+
</properties>
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter-web</artifactId>
32+
<exclusions>
33+
<exclusion>
34+
<groupId>com.fasterxml.jackson.core</groupId>
35+
<artifactId>jackson-databind</artifactId>
36+
</exclusion>
37+
</exclusions>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>com.github.binarywang</groupId>
42+
<artifactId>weixin-java-open</artifactId>
43+
<version>${weixin-java-open.version}</version>
44+
</dependency>
45+
46+
<!-- Testing Dependencies -->
47+
<dependency>
48+
<groupId>org.springframework.boot</groupId>
49+
<artifactId>spring-boot-starter-test</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>redis.clients</groupId>
55+
<artifactId>jedis</artifactId>
56+
<version>2.9.0</version>
57+
</dependency>
58+
</dependencies>
59+
60+
</project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.github.binarywang.demo.wechat;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5+
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
/**
7+
* @author <a href="https://github.com/007gzs">007</a>
8+
*/
9+
@SpringBootApplication
10+
@EnableAutoConfiguration
11+
public class WxOpenApplication {
12+
public static void main(String[] args) {
13+
SpringApplication.run(WxOpenApplication.class, args);
14+
}
15+
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
package com.github.binarywang.demo.wechat.config;
2+
3+
import org.springframework.boot.context.properties.ConfigurationProperties;
4+
import redis.clients.jedis.JedisPoolConfig;
5+
import redis.clients.jedis.Protocol;
6+
7+
import javax.net.ssl.HostnameVerifier;
8+
import javax.net.ssl.SSLParameters;
9+
import javax.net.ssl.SSLSocketFactory;
10+
/**
11+
* @author <a href="https://github.com/007gzs">007</a>
12+
*/
13+
@ConfigurationProperties(prefix = "wechat.redis")
14+
public class RedisProperies extends JedisPoolConfig {
15+
private String host = Protocol.DEFAULT_HOST;
16+
private int port = Protocol.DEFAULT_PORT;
17+
private String password;
18+
private int database = 1;
19+
private int connectionTimeout = Protocol.DEFAULT_TIMEOUT;
20+
private int soTimeout = Protocol.DEFAULT_TIMEOUT;
21+
private String clientName;
22+
private boolean ssl;
23+
private SSLSocketFactory sslSocketFactory;
24+
private SSLParameters sslParameters;
25+
private HostnameVerifier hostnameVerifier;
26+
27+
public boolean isSsl() {
28+
return ssl;
29+
}
30+
31+
public void setSsl(boolean ssl) {
32+
this.ssl = ssl;
33+
}
34+
35+
public SSLSocketFactory getSslSocketFactory() {
36+
return sslSocketFactory;
37+
}
38+
39+
public void setSslSocketFactory(SSLSocketFactory sslSocketFactory) {
40+
this.sslSocketFactory = sslSocketFactory;
41+
}
42+
43+
public SSLParameters getSslParameters() {
44+
return sslParameters;
45+
}
46+
47+
public void setSslParameters(SSLParameters sslParameters) {
48+
this.sslParameters = sslParameters;
49+
}
50+
51+
public HostnameVerifier getHostnameVerifier() {
52+
return hostnameVerifier;
53+
}
54+
55+
public void setHostnameVerifier(HostnameVerifier hostnameVerifier) {
56+
this.hostnameVerifier = hostnameVerifier;
57+
}
58+
59+
public String getHost() {
60+
return host;
61+
}
62+
63+
public void setHost(String host) {
64+
if (host == null || "".equals(host)) {
65+
host = Protocol.DEFAULT_HOST;
66+
}
67+
this.host = host;
68+
}
69+
70+
public int getPort() {
71+
return port;
72+
}
73+
74+
public void setPort(int port) {
75+
this.port = port;
76+
}
77+
78+
public String getPassword() {
79+
return password;
80+
}
81+
82+
public void setPassword(String password) {
83+
if ("".equals(password)) {
84+
password = null;
85+
}
86+
this.password = password;
87+
}
88+
89+
public int getDatabase() {
90+
return database;
91+
}
92+
93+
public void setDatabase(int database) {
94+
this.database = database;
95+
}
96+
97+
public String getClientName() {
98+
return clientName;
99+
}
100+
101+
public void setClientName(String clientName) {
102+
if ("".equals(clientName)) {
103+
clientName = null;
104+
}
105+
this.clientName = clientName;
106+
}
107+
108+
public int getConnectionTimeout() {
109+
return connectionTimeout;
110+
}
111+
112+
public void setConnectionTimeout(int connectionTimeout) {
113+
this.connectionTimeout = connectionTimeout;
114+
}
115+
116+
public int getSoTimeout() {
117+
return soTimeout;
118+
}
119+
120+
public void setSoTimeout(int soTimeout) {
121+
this.soTimeout = soTimeout;
122+
}
123+
}

0 commit comments

Comments
 (0)