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. 17
      pom.xml

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

@ -2,15 +2,13 @@
server.port=12345 server.port=12345
# session config # session config
server.session.timeout=7200 server.servlet.session.timeout=7200
server.servlet.context-path=/escheduler/
server.context-path=/escheduler/
# file size limit for upload # file size limit for upload
spring.http.multipart.max-file-size=1024MB spring.servlet.multipart.max-file-size=1024MB
spring.http.multipart.max-request-size=1024MB spring.servlet.multipart.max-request-size=1024MB
#post content #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.*; 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) { if (null == instance) {
syncInit(); syncInit();
} }
@ -39,7 +39,7 @@ public class MysqlUtil {
private static synchronized void syncInit() { private static synchronized void syncInit() {
if (instance == null) { 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) { public static void releaseResource(ResultSet rs, PreparedStatement ps, Connection conn) {
MysqlUtil.getInstance().release(rs,ps,conn); MysqlUtils.getInstance().release(rs,ps,conn);
if (null != rs) { if (null != rs) {
try { try {
rs.close(); rs.close();

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

@ -16,7 +16,7 @@
*/ */
package cn.escheduler.dao.upgrade; 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.common.utils.ScriptRunner;
import cn.escheduler.dao.AbstractBaseDao; import cn.escheduler.dao.AbstractBaseDao;
import cn.escheduler.dao.datasource.ConnectionFactory; import cn.escheduler.dao.datasource.ConnectionFactory;
@ -98,7 +98,7 @@ public class UpgradeDao extends AbstractBaseDao {
logger.error(e.getMessage(),e); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException("sql: " + sql, e); throw new RuntimeException("sql: " + sql, e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException(e.getMessage(),e); throw new RuntimeException(e.getMessage(),e);
} finally { } 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); logger.error(e.getMessage(),e);
throw new RuntimeException("sql: " + upgradeSQL, e); throw new RuntimeException("sql: " + upgradeSQL, e);
} finally { } finally {
MysqlUtil.realeaseResource(null, pstmt, conn); MysqlUtils.releaseResource(null, pstmt, conn);
} }
} }

17
pom.xml

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

Loading…
Cancel
Save