Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature issue #3804 #3805

Merged
merged 17 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<groupId>${project.groupId}</groupId>
<artifactId>nacos-common</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-sys</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.alibaba.nacos.auth.common.env.ReloadableConfigs;
import com.alibaba.nacos.common.JustForTest;
import com.alibaba.nacos.sys.utils.ApplicationUtils;
import io.jsonwebtoken.io.Decoders;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -93,7 +94,7 @@ public boolean isAuthEnabled() {
return BooleanUtils.toBoolean(enabled);
}
return BooleanUtils
.toBoolean(reloadableConfigs.getProperties().getProperty("nacos.core.auth.enabled", "false"));
.toBoolean(ApplicationUtils.getProperty("nacos.core.auth.enabled", "false"));
}

/**
Expand All @@ -106,7 +107,7 @@ public boolean isCachingEnabled() {
return cachingEnabled;
}
return BooleanUtils
.toBoolean(reloadableConfigs.getProperties().getProperty("nacos.core.auth.caching.enabled", "true"));
.toBoolean(ApplicationUtils.getProperty("nacos.core.auth.caching.enabled", "true"));
}

@JustForTest
Expand Down

This file was deleted.

11 changes: 11 additions & 0 deletions console/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,14 @@ nacos.istio.mcp.server.enabled=false
# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
### rpc request timeout, default 5 seconds
# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000


## HTTP Encoding
spring.http.encoding.force=true
spring.http.encoding.enabled=true

## i18n
spring.messages.encoding=UTF-8

## Exclude Spring Boot Auto-Configuration class(es)
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
chuntaojun marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import com.alibaba.nacos.core.cluster.AbstractMemberLookup;
import com.alibaba.nacos.core.cluster.Member;
import com.alibaba.nacos.core.cluster.MemberUtils;
import com.alibaba.nacos.core.file.FileChangeEvent;
import com.alibaba.nacos.core.file.FileWatcher;
import com.alibaba.nacos.core.file.WatchFileCenter;
import com.alibaba.nacos.sys.file.FileChangeEvent;
import com.alibaba.nacos.sys.file.FileWatcher;
import com.alibaba.nacos.sys.file.WatchFileCenter;
import com.alibaba.nacos.core.utils.ApplicationUtils;
import com.alibaba.nacos.core.utils.Loggers;
import org.apache.commons.lang3.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.alibaba.nacos.common.executor.ThreadPoolManager;
import com.alibaba.nacos.common.http.HttpClientManager;
import com.alibaba.nacos.common.notify.NotifyCenter;
import com.alibaba.nacos.core.file.WatchFileCenter;
import com.alibaba.nacos.sys.file.WatchFileCenter;
import com.alibaba.nacos.core.utils.ApplicationUtils;
import com.alibaba.nacos.core.utils.DiskUtils;
import com.alibaba.nacos.core.utils.InetUtils;
Expand Down
81 changes: 0 additions & 81 deletions core/src/main/java/com/alibaba/nacos/core/utils/PropertyUtil.java

This file was deleted.

2 changes: 1 addition & 1 deletion core/src/main/resources/META-INF/logback/nacos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<level value="INFO"/>
</logger>

<logger name="com.alibaba.nacos.core.file.WatchFileCenter">
<logger name="com.alibaba.nacos.sys.file.WatchFileCenter">
<appender-ref ref="CONSOLE"/>
<level value="INFO"/>
</logger>
Expand Down
36 changes: 0 additions & 36 deletions core/src/main/resources/META-INF/nacos-default.properties

This file was deleted.

9 changes: 0 additions & 9 deletions core/src/main/resources/META-INF/spring.factories
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# ApplicationContextInitializer
org.springframework.context.ApplicationContextInitializer=\
com.alibaba.nacos.core.utils.ApplicationUtils

# ApplicationListener
org.springframework.context.ApplicationListener=\
com.alibaba.nacos.core.code.StandaloneProfileApplicationListener

# EnvironmentPostProcessor
org.springframework.boot.env.EnvironmentPostProcessor=\
com.alibaba.nacos.core.env.NacosDefaultPropertySourceEnvironmentPostProcessor

# SpringApplicationRunListener
org.springframework.boot.SpringApplicationRunListener=\
com.alibaba.nacos.core.code.LoggingSpringApplicationRunListener,\
Expand Down
2 changes: 1 addition & 1 deletion distribution/conf/nacos-logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
<level value="INFO"/>
</logger>

<logger name="com.alibaba.nacos.core.file.WatchFileCenter">
<logger name="com.alibaba.nacos.sys.file.WatchFileCenter">
<appender-ref ref="CONSOLE"/>
<level value="INFO"/>
</logger>
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@
<module>istio</module>
<module>consistency</module>
<module>auth</module>
<module>sys</module>
</modules>

<!-- 所有的子项目默认依赖 -->
Expand Down Expand Up @@ -686,6 +687,11 @@
<artifactId>nacos-auth</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-sys</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Loading