Browse Source

Merge pull request #269 from lidongdai/dev

update application.properties
pull/2/head
easyscheduler 6 years ago committed by GitHub
parent
commit
a362954a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      escheduler-api/src/main/resources/application.properties
  2. 16
      escheduler-common/src/main/java/cn/escheduler/common/utils/MysqlUtils.java
  3. 18
      escheduler-dao/src/main/java/cn/escheduler/dao/upgrade/UpgradeDao.java
  4. 21
      pom.xml

12
escheduler-api/src/main/resources/application.properties

@ -2,15 +2,13 @@
server.port=12345
# session config
server.session.timeout=7200
server.servlet.session.timeout=7200
server.context-path=/escheduler/
server.servlet.context-path=/escheduler/
# file size limit for upload
spring.http.multipart.max-file-size=1024MB
spring.http.multipart.max-request-size=1024MB
spring.servlet.multipart.max-file-size=1024MB
spring.servlet.multipart.max-request-size=1024MB
#post content
server.max-http-post-size=5000000
server.jetty.max-http-post-size=5000000

16
escheduler-common/src/main/java/cn/escheduler/common/utils/MysqlUtil.java → escheduler-common/src/main/java/cn/escheduler/common/utils/MysqlUtils.java

@ -21,16 +21,16 @@ import org.slf4j.LoggerFactory;
import java.sql.*;
public class MysqlUtil {
public class MysqlUtils {
public static final Logger logger = LoggerFactory.getLogger(MysqlUtil.class);
public static final Logger logger = LoggerFactory.getLogger(MysqlUtils.class);
private static MysqlUtil instance;
private static MysqlUtils instance;
MysqlUtil() {
MysqlUtils() {
}
public static MysqlUtil getInstance() {
public static MysqlUtils getInstance() {
if (null == instance) {
syncInit();
}
@ -39,7 +39,7 @@ public class MysqlUtil {
private static synchronized void syncInit() {
if (instance == null) {
instance = new MysqlUtil();
instance = new MysqlUtils();
}
}
@ -75,8 +75,8 @@ public class MysqlUtil {
}
}
public static void realeaseResource(ResultSet rs, PreparedStatement ps, Connection conn) {
MysqlUtil.getInstance().release(rs,ps,conn);
public static void releaseResource(ResultSet rs, PreparedStatement ps, Connection conn) {
MysqlUtils.getInstance().release(rs,ps,conn);
if (null != rs) {
try {
rs.close();

18
escheduler-dao/src/main/java/cn/escheduler/dao/upgrade/UpgradeDao.java

@ -16,7 +16,7 @@
*/
package cn.escheduler.dao.upgrade;
import cn.escheduler.common.utils.MysqlUtil;
import cn.escheduler.common.utils.MysqlUtils;
import cn.escheduler.common.utils.ScriptRunner;
import cn.escheduler.dao.AbstractBaseDao;
import cn.escheduler.dao.datasource.ConnectionFactory;
@ -98,7 +98,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, null, conn);
MysqlUtils.releaseResource(null, null, conn);
}
@ -126,7 +126,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, null, conn);
MysqlUtils.releaseResource(null, null, conn);
}
@ -152,7 +152,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, null, conn);
MysqlUtils.releaseResource(null, null, conn);
}
@ -179,7 +179,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, null, conn);
MysqlUtils.releaseResource(null, null, conn);
}
@ -207,7 +207,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException("sql: " + sql, e);
} finally {
MysqlUtil.realeaseResource(rs, pstmt, conn);
MysqlUtils.releaseResource(rs, pstmt, conn);
}
}
@ -277,7 +277,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, pstmt, conn);
MysqlUtils.releaseResource(null, pstmt, conn);
}
}
@ -316,7 +316,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e);
} finally {
MysqlUtil.realeaseResource(null, pstmt, conn);
MysqlUtils.releaseResource(null, pstmt, conn);
}
}
@ -338,7 +338,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e);
throw new RuntimeException("sql: " + upgradeSQL, e);
} finally {
MysqlUtil.realeaseResource(null, pstmt, conn);
MysqlUtils.releaseResource(null, pstmt, conn);
}
}

21
pom.xml

@ -19,6 +19,7 @@
<logback.version>1.2.3</logback.version>
<hadoop.version>2.7.3</hadoop.version>
<quartz.version>2.2.3</quartz.version>
<jackson.version>2.9.8</jackson.version>
</properties>
<dependencyManagement>
@ -163,27 +164,27 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.2</version>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.2</version>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.6</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.6</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.6</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
@ -241,8 +242,6 @@
<version>1.10</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@ -368,13 +367,13 @@
</dependencies>
</dependencyManagement>
<scm>
<connection>scm:git:https://github.com/analysys/EasyScheduler.git</connection>
<developerConnection>scm:git:https://github.com/analysys/EasyScheduler.git</developerConnection>
<url>https://github.com/analysys/EasyScheduler.git</url>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>
<build>
<plugins>
@ -435,7 +434,7 @@
</configuration>
</plugin>
</plugins>
</build>
<modules>

Loading…
Cancel
Save