diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index c378a44..a1f58ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,7 +87,14 @@
c3p0
0.9.1.2
-
+
+
+
+ com.alibaba
+ druid
+ 1.1.6
+
+
org.apache.commons
commons-lang3
@@ -228,6 +235,24 @@
2.5
jar
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.5
+
+
+ org.slf4j
+ slf4j-log4j12
+ 1.7.5
+
+
+ org.projectlombok
+ lombok
+ 1.16.18
+ provided
+
+
log4j
log4j
diff --git a/src/main/java/com/ifish/jpush/SmsNumSend.java b/src/main/java/com/ifish/jpush/SmsNumSend.java
index 003ed50..da32614 100644
--- a/src/main/java/com/ifish/jpush/SmsNumSend.java
+++ b/src/main/java/com/ifish/jpush/SmsNumSend.java
@@ -52,4 +52,12 @@ public class SmsNumSend {
}
return false;
}
+
+ public static void main(String[] args) {
+ Integer code = (int) (Math.random() * 9000 + 1000);
+ SmsNumSend smsNumSend = new SmsNumSend();
+ boolean b = smsNumSend.sendSmsNum("17520491562", String.valueOf(code), "注册验证", "SMS_720018");
+ System.out.println(b);
+
+ }
}
diff --git a/src/main/resources/application-context.xml b/src/main/resources/application-context.xml
index d7086dc..b891eb4 100644
--- a/src/main/resources/application-context.xml
+++ b/src/main/resources/application-context.xml
@@ -31,23 +31,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -58,11 +79,11 @@
-
-
+
+
com.ifish.entity
-
-
+
+
${hibernate.dialect}
@@ -72,13 +93,13 @@
-
+
-
+
@@ -96,6 +117,6 @@
-
+
\ No newline at end of file
diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties
index 66e9300..0cbf3ee 100644
--- a/src/main/resources/jdbc.properties
+++ b/src/main/resources/jdbc.properties
@@ -1,29 +1,58 @@
-c3p0.driverClassName=com.mysql.jdbc.Driver
-c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
-c3p0.username=ifish
-c3p0.password=ifish7pwd
-#c3p0.username=root
-#c3p0.password=123456
+jdbc.driver=com.mysql.jdbc.Driver
+#jdbc.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
+jdbc.url=jdbc\:mysql\://139.196.24.156\:3306/myfishdb?characterEncoding\=UTF-8
+#jdbc.username=ifish
+#jdbc.password=ifish7pwd
+jdbc.username=root
+jdbc.password=ifish7mysql
+#jdbc.testWhileIdle=true
+jdbc.validationQuery=SELECT * FROM DUAL
+initialSize=1
+minIdle=1
+maxActive=20
+maxWait=60000
+timeBetweenEvictionRunsMillis=60000
+minEvictableIdleTimeMillis=300000
+poolPreparedStatements=true
+maxPoolPreparedStatementPerConnectionSize=20
+removeAbandonedTimeout=1800
-c3p0.autoCommitOnClose=true
-c3p0.initialPoolSize=20
-c3p0.minPoolSize=20
-c3p0.maxPoolSize=50
-c3p0.acquireIncrement=3
-
-c3p0.checkoutTimeout=5000
-c3p0.maxIdleTime=7200
-c3p0.idleConnectionTestPeriod=18000
-#c3p0.maxIdleTimeExcessConnections=1800
-
-#c3p0.automaticTestTable=C3P0TestTable
-#c3p0.testConnectionOnCheckout=false
-#c3p0.testConnectionOnCheckin=false
-
-#org.hibernate.dialect.MySQLInnoDBDialect
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.hbm2ddl.auto=false
hibernate.jdbc.batch_size=50
hibernate.query.substitutions=true 1,false 0
+
+
+
+
+#c3p0.driverClassName=com.mysql.jdbc.Driver
+#c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
+#c3p0.username=ifish
+#c3p0.password=ifish7pwd
+##c3p0.username=root
+##c3p0.password=123456
+#
+#c3p0.autoCommitOnClose=true
+#c3p0.initialPoolSize=20
+#c3p0.minPoolSize=20
+#c3p0.maxPoolSize=50
+#c3p0.acquireIncrement=3
+#
+#c3p0.checkoutTimeout=5000
+#c3p0.maxIdleTime=7200
+#c3p0.idleConnectionTestPeriod=18000
+##c3p0.maxIdleTimeExcessConnections=1800
+#
+##c3p0.automaticTestTable=C3P0TestTable
+##c3p0.testConnectionOnCheckout=false
+##c3p0.testConnectionOnCheckin=false
+#
+##org.hibernate.dialect.MySQLInnoDBDialect
+#hibernate.dialect=org.hibernate.dialect.MySQLDialect
+#hibernate.show_sql=false
+#hibernate.format_sql=true
+#hibernate.hbm2ddl.auto=false
+#hibernate.jdbc.batch_size=50
+#hibernate.query.substitutions=true 1,false 0
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
new file mode 100644
index 0000000..dc3a6b9
--- /dev/null
+++ b/src/main/resources/log4j.properties
@@ -0,0 +1,37 @@
+log4j.rootLogger=INFO,CONSOLE,FILE,ROLLING_FILE
+###################
+# Console Appender
+###################
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.Threshold=INFO
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[Ifish7][%-5p]%d - (%F:%L) - %m%n
+########################
+# [INFO]Daily Rolling File
+########################
+log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FILE.Threshold=INFO
+log4j.appender.FILE.File=/logs/ifish/Ifish7_ALL.log
+log4j.appender.FILE.Append=true
+log4j.appender.FILE.ImmediateFlush = true
+log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=[Ifish7][%-5p]%d - %c.%t(%F:%L) - %m%n
+
+########################
+# [ERROR]Rolling File
+########################
+log4j.appender.ROLLING_FILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROLLING_FILE.Threshold=ERROR
+log4j.appender.ROLLING_FILE.File=/logs/ifish/Ifish7_ERROR.log
+log4j.appender.ROLLING_FILE.Append=true
+log4j.appender.ROLLING_FILE.ImmediateFlush = true
+log4j.appender.ROLLING_FILE.DatePattern='.'yyyy-MM-dd
+log4j.appender.ROLLING_FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROLLING_FILE.layout.ConversionPattern=[Ifish7][%-5p]%d - %c.%t(%F:%L) - %m%n
+
+log4j.logger.org.springframework=INFO
+log4j.logger.com.hibernate=INFO
+log4j.logger.java.sql=INFO
+
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
deleted file mode 100644
index 6e5755d..0000000
--- a/src/main/resources/logback.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
- %d{yyyy-MM-dd HH:mm:ss} 【%-5level】 【%logger{50}】 %msg%n
- GBK
-
-
-
-
-
- ${LOG_HOME}/ifish/localhost.log
-
- ${LOG_HOME}/ifish/%d{yyyy-MM-dd}.log
- 30
-
- 100MB
-
-
-
- %d{yyyy-MM-dd HH:mm:ss} 【%-5level】 【%logger{50}】 %msg%n
- UTF-8
-
-
- WARN
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/spring-mybatis.xml b/src/main/resources/spring-mybatis.xml
index e74a761..69543c3 100644
--- a/src/main/resources/spring-mybatis.xml
+++ b/src/main/resources/spring-mybatis.xml
@@ -1,29 +1,15 @@
+ ">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 69ea1c2..cceeeb1 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -6,6 +6,9 @@
index.jsp
+
+ org.springframework.web.context.ContextLoaderListener
+
contextConfigLocation
@@ -13,9 +16,6 @@
classpath:spring-mybatis.xml
-
- org.springframework.web.context.ContextLoaderListener
-
encoding