Merge branch 'develop' into feature_format_fe_code

This commit is contained in:
zhichen 2018-11-16 10:56:36 +08:00
commit 3b4c6df1b8
31 changed files with 351 additions and 293 deletions

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,19 +1,3 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.nacos.client.identify;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -30,6 +14,7 @@ package com.alibaba.nacos.client.identify;
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.alibaba.nacos.client.identify;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;

View File

@ -1,23 +1,3 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.nacos.client.naming.utils;
/**
* Created by harold on 2015/12/7.
*/
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -34,6 +14,11 @@ package com.alibaba.nacos.client.naming.utils;
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.alibaba.nacos.client.naming.utils;
/**
* Created by harold on 2015/12/7.
*/
import java.util.*; import java.util.*;

View File

@ -1,18 +1,3 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file

View File

@ -1,18 +1,3 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -25,13 +24,6 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.ConfigurableEnvironment;
import java.io.IOException;
import java.util.List;
import static com.alibaba.nacos.common.util.SystemUtils.LOCAL_IP;
import static com.alibaba.nacos.common.util.SystemUtils.NACOS_HOME;
import static com.alibaba.nacos.common.util.SystemUtils.STANDALONE_MODE;
import static com.alibaba.nacos.common.util.SystemUtils.readClusterConf;
import static org.springframework.boot.context.logging.LoggingApplicationListener.CONFIG_PROPERTY; import static org.springframework.boot.context.logging.LoggingApplicationListener.CONFIG_PROPERTY;
import static org.springframework.core.io.ResourceLoader.CLASSPATH_URL_PREFIX; import static org.springframework.core.io.ResourceLoader.CLASSPATH_URL_PREFIX;
@ -47,10 +39,6 @@ public class LoggingSpringApplicationRunListener implements SpringApplicationRun
private static final Logger logger = LoggerFactory.getLogger(LoggingSpringApplicationRunListener.class); private static final Logger logger = LoggerFactory.getLogger(LoggingSpringApplicationRunListener.class);
private static final String MODE_PROPERTY_KEY = "nacos.mode";
private static final String LOCAL_IP_PROPERTY_KEY = "nacos.local.ip";
private final SpringApplication application; private final SpringApplication application;
private final String[] args; private final String[] args;
@ -75,32 +63,11 @@ public class LoggingSpringApplicationRunListener implements SpringApplicationRun
DEFAULT_NACOS_LOGBACK_LOCATION); DEFAULT_NACOS_LOGBACK_LOCATION);
} }
} }
if (STANDALONE_MODE) {
System.setProperty(MODE_PROPERTY_KEY, "stand alone");
} else {
System.setProperty(MODE_PROPERTY_KEY, "cluster");
}
System.setProperty(LOCAL_IP_PROPERTY_KEY, LOCAL_IP);
} }
@Override @Override
public void contextPrepared(ConfigurableApplicationContext context) { public void contextPrepared(ConfigurableApplicationContext context) {
System.out.printf("Log files: %s/logs/%n", NACOS_HOME);
System.out.printf("Conf files: %s/conf/%n", NACOS_HOME);
System.out.printf("Data files: %s/data/%n", NACOS_HOME);
if (!STANDALONE_MODE) {
try {
List<String> clusterConf = readClusterConf();
System.out.printf("The server IP list of Nacos is %s%n", clusterConf);
} catch (IOException e) {
logger.error("read cluster conf fail", e);
}
}
System.out.println();
} }
@Override @Override

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -0,0 +1,165 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.nacos.core.listener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.boot.context.event.EventPublishingRunListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import static com.alibaba.nacos.common.util.SystemUtils.LOCAL_IP;
import static com.alibaba.nacos.common.util.SystemUtils.NACOS_HOME;
import static com.alibaba.nacos.common.util.SystemUtils.STANDALONE_MODE;
import static com.alibaba.nacos.common.util.SystemUtils.readClusterConf;
/**
* Logging starting message {@link SpringApplicationRunListener} before {@link EventPublishingRunListener} execution
*
* @author <a href="mailto:huangxiaoyu1018@gmail.com">hxy1991</a>
* @since 0.5.0
*/
public class StartingSpringApplicationRunListener implements SpringApplicationRunListener, Ordered {
private static final Logger LOGGER = LoggerFactory.getLogger(StartingSpringApplicationRunListener.class);
private static final String MODE_PROPERTY_KEY = "nacos.mode";
private static final String LOCAL_IP_PROPERTY_KEY = "nacos.local.ip";
private ScheduledExecutorService scheduledExecutorService;
private volatile boolean starting;
public StartingSpringApplicationRunListener(SpringApplication application, String[] args) {
}
@Override
public void starting() {
starting = true;
}
@Override
public void environmentPrepared(ConfigurableEnvironment environment) {
if (STANDALONE_MODE) {
System.setProperty(MODE_PROPERTY_KEY, "stand alone");
} else {
System.setProperty(MODE_PROPERTY_KEY, "cluster");
}
System.setProperty(LOCAL_IP_PROPERTY_KEY, LOCAL_IP);
}
@Override
public void contextPrepared(ConfigurableApplicationContext context) {
logClusterConf();
logStarting();
}
@Override
public void contextLoaded(ConfigurableApplicationContext context) {
}
@Override
public void started(ConfigurableApplicationContext context) {
starting = false;
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdownNow();
}
logFilePath();
LOGGER.info("Nacos started successfully in {} mode.", System.getProperty(MODE_PROPERTY_KEY));
}
@Override
public void running(ConfigurableApplicationContext context) {
}
@Override
public void failed(ConfigurableApplicationContext context, Throwable exception) {
starting = false;
logFilePath();
LOGGER.error("Nacos failed to start, please see {}/logs/nacos.log for more details.", NACOS_HOME);
}
/**
* Before {@link EventPublishingRunListener}
*
* @return HIGHEST_PRECEDENCE
*/
@Override
public int getOrder() {
return HIGHEST_PRECEDENCE;
}
private void logClusterConf() {
if (!STANDALONE_MODE) {
try {
List<String> clusterConf = readClusterConf();
LOGGER.info("The server IP list of Nacos is {}", clusterConf);
} catch (IOException e) {
LOGGER.error("read cluster conf fail", e);
}
}
}
private void logFilePath() {
LOGGER.info("Nacos Log files: {}/logs/", NACOS_HOME);
LOGGER.info("Nacos Conf files: {}/conf/", NACOS_HOME);
LOGGER.info("Nacos Data files: {}/data/", NACOS_HOME);
}
private void logStarting() {
if (!STANDALONE_MODE) {
scheduledExecutorService = new ScheduledThreadPoolExecutor(1, new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r, "nacos-starting");
thread.setDaemon(true);
return thread;
}
});
scheduledExecutorService.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
if (starting) {
LOGGER.info("Nacos is starting...");
}
}
}, 1, 1, TimeUnit.SECONDS);
}
}
}

View File

@ -63,4 +63,8 @@
</springProfile> </springProfile>
<logger name="com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener">
<appender-ref ref="CONSOLE"/>
<level value="INFO"/>
</logger>
</configuration> </configuration>

View File

@ -8,4 +8,5 @@ com.alibaba.nacos.core.env.NacosDefaultPropertySourceEnvironmentPostProcessor
# SpringApplicationRunListener # SpringApplicationRunListener
org.springframework.boot.SpringApplicationRunListener=\ org.springframework.boot.SpringApplicationRunListener=\
com.alibaba.nacos.core.listener.LoggingSpringApplicationRunListener com.alibaba.nacos.core.listener.LoggingSpringApplicationRunListener,\
com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -63,11 +63,17 @@ JAVA_OPT="${JAVA_OPT} --logging.config=${BASE_DIR}/conf/nacos-logback.xml"
if [ ! -d "${BASE_DIR}/logs" ]; then if [ ! -d "${BASE_DIR}/logs" ]; then
mkdir ${BASE_DIR}/logs mkdir ${BASE_DIR}/logs
fi fi
if [ ! -f "${BASE_DIR}/logs/start.log" ]; then
touch "${BASE_DIR}/logs/start.log"
fi
echo "$JAVA ${JAVA_OPT}" echo "$JAVA ${JAVA_OPT}"
echo "$JAVA ${JAVA_OPT}" > ${BASE_DIR}/logs/start.log 2>&1 &
nohup $JAVA ${JAVA_OPT} >> ${BASE_DIR}/logs/start.log 2>&1 & if [[ "${MODE}" == "standalone" ]]; then
echo "nacos is startingyou can check the ${BASE_DIR}/logs/start.log" $JAVA ${JAVA_OPT}
else
if [ ! -f "${BASE_DIR}/logs/start.out" ]; then
touch "${BASE_DIR}/logs/start.out"
fi
echo "$JAVA ${JAVA_OPT}" >> ${BASE_DIR}/logs/start.out 2>&1 &
nohup $JAVA ${JAVA_OPT} >> ${BASE_DIR}/logs/start.out 2>&1 &
echo "nacos is startingyou can check the ${BASE_DIR}/logs/start.out"
fi

View File

@ -524,6 +524,7 @@
<appender-ref ref="startLog" /> <appender-ref ref="startLog" />
</logger> </logger>
<springProfile name="standalone">
<logger name="org.springframework"> <logger name="org.springframework">
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
<level value="INFO"/> <level value="INFO"/>
@ -548,6 +549,12 @@
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
<level value="WARN"/> <level value="WARN"/>
</logger> </logger>
</springProfile>
<logger name="com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener">
<appender-ref ref="CONSOLE"/>
<level value="INFO"/>
</logger>
<root> <root>
<level value="INFO"/> <level value="INFO"/>

View File

@ -1,10 +1,9 @@
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Copyright 1999-2018 Alibaba Group Holding Ltd.
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. * Licensed under the Apache License, Version 2.0 (the "License");
* The ASF licenses this file to You under the Apache License, Version 2.0 * you may not use this file except in compliance with the License.
* (the "License"); you may not use this file except in compliance with * You may obtain a copy of the License at
* the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *

View File

@ -242,7 +242,10 @@
<exclude>src/main/resources/static/**/*.js</exclude> <exclude>src/main/resources/static/**/*.js</exclude>
<exclude>src/main/resources/**/*.svg</exclude> <exclude>src/main/resources/**/*.svg</exclude>
<exclude>src/main/resources/static/public/css/console1412.css</exclude> <exclude>src/main/resources/static/public/css/console1412.css</exclude>
<exclude>src/main/resources/static/public/js/vs/editor/editor.main.css</exclude> <exclude>/src/main/resources/static/js/vs/editor/editor.main.css</exclude>
<exclude>src/main/resources/static/console-fe/public/css/console1412.css</exclude>
<exclude>src/main/resources/static/console-fe/public/js/vs/editor/editor.main.css</exclude>
<exclude>src/main/resources/static/console-fe/.vscode/settings.json</exclude>
<exclude>bin/*</exclude> <exclude>bin/*</exclude>
<exclude>conf/*</exclude> <exclude>conf/*</exclude>
<exclude>derby.log</exclude> <exclude>derby.log</exclude>

View File

@ -13,22 +13,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.nacos.test.smoke; package com.alibaba.nacos.test.smoke;

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Licensed to the Apache Software Foundation (ASF) under one or more ~ Copyright 1999-2018 Alibaba Group Holding Ltd.
~ contributor license agreements. See the NOTICE file distributed with ~
~ this work for additional information regarding copyright ownership. ~ Licensed under the Apache License, Version 2.0 (the "License");
~ The ASF licenses this file to You under the Apache License, Version 2.0 ~ you may not use this file except in compliance with the License.
~ (the "License"); you may not use this file except in compliance with ~ You may obtain a copy of the License at
~ the License. You may obtain a copy of the License at
~ ~
~ http://www.apache.org/licenses/LICENSE-2.0 ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~