第一次提交

This commit is contained in:
2026-04-03 09:56:14 +08:00
commit 60e2c8debd
3598 changed files with 746659 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
package com.alibaba.nacos;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import javax.servlet.http.HttpServletResponse;
/**
* Nacos 启动类
*
* @author zyf
*/
@SpringBootApplication(scanBasePackages = "com.alibaba.nacos")
@ServletComponentScan
@EnableScheduling
public class JeecgNacosApplication {
/** 是否单机模式启动 */
private static String standalone = "true";
/** 是否开启鉴权 */
private static String enabled = "false";
public static void main(String[] args) {
System.setProperty("nacos.standalone", standalone);
System.setProperty("nacos.core.auth.enabled", enabled);
// //一旦Nacos初始化用户名nacos将不能被修改但你可以通过控制台或API来修改密码 https://nacos.io/en/blog/faq/nacos-user-question-history8420
// System.setProperty("nacos.core.auth.default.username", "nacos");
// System.setProperty("nacos.core.auth.default.password", "nacos");
System.setProperty("server.tomcat.basedir","logs");
//自定义启动端口号
System.setProperty("server.port","8848");
SpringApplication.run(JeecgNacosApplication.class, args);
}
/**
* 默认跳转首页
*
* @param model
* @return
*/
@GetMapping("/")
public String index(Model model, HttpServletResponse response) {
// 视图重定向 - 跳转
return "/nacos";
}
}

View File

@@ -0,0 +1,63 @@
server:
servlet:
contextPath: /nacos
tomcat:
accesslog:
enabled: true
pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
basedir: ''
spring:
sql:
init:
platform: dm
db:
pool:
config:
driverClassName: dm.jdbc.driver.DmDriver
num: 1
password:
'0': SYSDBA
url:
'0': jdbc:dm://192.168.1.188:30236/DMSERVER?schema=NACOS&compatibleMode=mysql&ignoreCase=true&ENCODING=utf-8
user:
'0': SYSDBA
management:
metrics:
export:
elastic:
enabled: false
influx:
enabled: false
nacos:
core:
auth:
enabled: false
caching:
enabled: true
server:
identity:
key: example
value: example
plugin:
nacos:
token:
expire:
seconds: 18000
secret:
key: SecretKey01234567890123456789012345345678999987654901234567890123456789
system:
type: nacos
istio:
mcp:
server:
enabled: false
naming:
empty-service:
auto-clean: true
clean:
initial-delay-ms: 50000
period-time-ms: 30000
security:
ignore:
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
standalone: true

View File

@@ -0,0 +1,60 @@
server:
servlet:
contextPath: /nacos
tomcat:
accesslog:
enabled: true
pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
basedir: ''
spring:
sql:
init:
platform: mysql
db:
num: 1
password:
'0': ${MYSQL-PWD:root}
url:
'0': jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
user:
'0': ${MYSQL-USER:root}
management:
metrics:
export:
elastic:
enabled: false
influx:
enabled: false
nacos:
core:
auth:
enabled: false
caching:
enabled: true
server:
identity:
key: nacos
value: nacos
plugin:
nacos:
token:
expire:
seconds: 18000
secret:
key: VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
system:
type: nacos
istio:
mcp:
server:
enabled: false
naming:
empty-service:
auto-clean: true
clean:
initial-delay-ms: 50000
period-time-ms: 30000
security:
ignore:
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
standalone: true

View File

@@ -0,0 +1,3 @@
spring:
profiles:
active: mysql