Fix standalone use derby failed bug

This commit is contained in:
nkorange 2019-07-09 11:04:00 +08:00
parent d8eef4f2f5
commit 65c2f55617
3 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ package com.alibaba.nacos.client.naming.utils;
*/
public class UtilAndComs {
public static final String VERSION = "Nacos-Java-Client:v1.0.1";
public static final String VERSION = "Nacos-Java-Client:v1.1.1";
public static String WEB_CONTEXT = "/nacos";

View File

@ -22,6 +22,7 @@ import com.alibaba.nacos.config.server.utils.StringUtils;
import org.apache.commons.dbcp.BasicDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
@ -61,6 +62,9 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
private JdbcTemplate jt;
private TransactionTemplate tjt;
@Autowired
private PropertyUtil propertyUtil;
@PostConstruct
public void init() {
BasicDataSource ds = new BasicDataSource();
@ -86,7 +90,7 @@ public class LocalDataSourceServiceImpl implements DataSourceService {
tm.setDataSource(ds);
tjt.setTimeout(5000);
if (STANDALONE_MODE && !PropertyUtil.isStandaloneUseMysql()) {
if (STANDALONE_MODE && !propertyUtil.isStandaloneUseMysql()) {
reload();
}
}

View File

@ -105,7 +105,7 @@ else
fi
JAVA_OPT="${JAVA_OPT} -Dnacos.home=${BASE_DIR}"
JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/target/${SERVER}.jar"
JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health -jar ${BASE_DIR}/target/${SERVER}.jar"
JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
JAVA_OPT="${JAVA_OPT} --spring.config.location=${CUSTOM_SEARCH_LOCATIONS}"
JAVA_OPT="${JAVA_OPT} --logging.config=${BASE_DIR}/conf/nacos-logback.xml"