mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 12:48:58 +08:00
🔒 Fixing security issues. 开启nacos 认证
This commit is contained in:
parent
f99dbbd90c
commit
95d0091c3e
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
|
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
watch:
|
||||
|
@ -43,7 +43,7 @@ public class PigNacosApplication {
|
||||
*/
|
||||
private static boolean initEnv() {
|
||||
System.setProperty(ConfigConstants.STANDALONE_MODE, "true");
|
||||
System.setProperty(ConfigConstants.AUTH_ENABLED, "false");
|
||||
System.setProperty(ConfigConstants.AUTH_ENABLED, "true");
|
||||
System.setProperty(ConfigConstants.LOG_BASEDIR, "logs");
|
||||
System.setProperty(ConfigConstants.LOG_ENABLED, "false");
|
||||
System.setProperty(ConfigConstants.NACOS_CONTEXT_PATH, "/nacos");
|
||||
|
@ -16,6 +16,10 @@ db:
|
||||
nacos:
|
||||
core:
|
||||
auth:
|
||||
server:
|
||||
identity:
|
||||
key: serverIdentity
|
||||
value: security
|
||||
plugin.nacos.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
enabled: false
|
||||
system.type: nacos
|
||||
|
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
|
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
|
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
|
@ -6,6 +6,8 @@ spring:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
username: @nacos.username@
|
||||
password: @nacos.password@
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pig-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
@ -14,9 +16,3 @@ spring:
|
||||
import:
|
||||
- optional:nacos:application-@profiles.active@.yml
|
||||
- optional:nacos:${spring.application.name}-@profiles.active@.yml
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pig-mysql:3306/pig_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
|
Loading…
Reference in New Issue
Block a user