添加忽略clazz

This commit is contained in:
2026-03-30 16:07:39 +08:00
parent 142745f558
commit 991d83d2fc
16 changed files with 742 additions and 21 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/framework-base/framework-base-entity/target/classes/com/krishna/framework/msg/vo/result/*.class
*.class
**/target/

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

76
.idea/workspace.xml generated
View File

@@ -4,35 +4,71 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="ee8c9151-ea57-48b2-a31a-ad8a51983f23" name="Changes" comment="" />
<list default="true" id="ee8c9151-ea57-48b2-a31a-ad8a51983f23" name="Changes" comment="Changes">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/framework-base/framework-base-server/src/main/resources/bootstrap-local.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/filters/config-dev.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/filters/config-dev.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/filters/config-prod.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/filters/config-prod.properties" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitSEFilterConfiguration">
<file-type-list>
<filtered-out-file-type name="LOCAL_BRANCH" />
<filtered-out-file-type name="REMOTE_BRANCH" />
<filtered-out-file-type name="TAG" />
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
</file-type-list>
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="workOffline" value="true" />
</MavenGeneralSettings>
</option>
</component>
<component name="ProjectId" id="2HTDLvTuAXCDcy25i2dxFZu1j5f" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RequestMappingsPanelOrder0" value="0" />
<property name="RequestMappingsPanelOrder1" value="1" />
<property name="RequestMappingsPanelWidth0" value="75" />
<property name="RequestMappingsPanelWidth1" value="75" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/framework-gateway/framework-gateway-biz" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.30995476" />
<property name="settings.editor.selected.configurable" value="MavenSettings" />
<property name="two.files.diff.last.used.folder" value="$PROJECT_DIR$/framework-gateway/framework-gateway-biz" />
</component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="G:\code\code\java\krishna-cloud-pro\framework-base\framework-base-server\src\main\resources" />
</key>
</component>
<component name="RunAnythingCache">
<option name="myCommands">
<command value="mvn clean" />
@@ -47,19 +83,6 @@
</option>
</component>
<component name="RunManager" selected="Spring Boot.GatewayServerApplication">
<configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
<option name="arquillianRunConfiguration">
<value>
<option name="containerStateName" value="" />
</value>
</option>
<option name="TEST_OBJECT" value="CLASS" />
<properties />
<listeners />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="BaseServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="framework-base-server" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.krishna.framework.BaseServerApplication" />
@@ -104,6 +127,9 @@
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration">
<configuration>C:\Users\leiyuwei\AppData\Roaming\Subversion</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ee8c9151-ea57-48b2-a31a-ad8a51983f23" name="Changes" comment="" />
@@ -156,7 +182,13 @@
<workItem from="1693531084429" duration="296000" />
<workItem from="1693531514302" duration="242000" />
<workItem from="1693540953607" duration="6454000" />
<workItem from="1694599911646" duration="655000" />
<workItem from="1694599911646" duration="3828000" />
<workItem from="1694950632362" duration="3073000" />
<workItem from="1695021694798" duration="9148000" />
<workItem from="1695115327309" duration="1189000" />
<workItem from="1695349290997" duration="648000" />
<workItem from="1710077845097" duration="996000" />
<workItem from="1710484378539" duration="1843000" />
</task>
<servers />
</component>
@@ -180,6 +212,18 @@
<option featureType="dependencySupport" implementationName="java:org.springframework:spring-messaging" />
<option featureType="dependencySupport" implementationName="java:org.springframework.boot:spring-boot" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />

170
doc/nacos配置/common.yml Normal file
View File

@@ -0,0 +1,170 @@
krishna:
feign:
# xxl-job-admin 的地址
job-server: http://127.0.0.1:8767
scan:
enabled: true
basePackage: com.krishna
webmvc:
undertow: true
header: true
system: # 详情看: SystemProperties
# 登录时否验证密码有效性 (常用于开发环境快速登录)
verifyPassword: true
# 登录时否验证验证码有效性 (常用于开发环境快速登录)
verifyCaptcha: true
# 默认用户密码
defPwd: '123456'
# 密码最大输错次数 小于0不限制
maxPasswordErrorNum: 10
# 密码错误锁定用户时间 除了0表示锁定到今天结束还支持m、h、d、w、M、y等单位
passwordErrorLockUserTime: '0'
recordKrishna: false
recordKrishnaArgs: true
recordKrishnaResult: true
# 缓存Key前缀
cachePrefix: lc
# oauth 服务扫描枚举类的包路径
enumPackage: "com.krishna"
# swagger 文档通用配置, 主要配置了全局参数、版本号信息、联系人信息 详情看: SwaggerProperties
swagger: # 详情看: SwaggerProperties
global-operation-parameters: # 全局参数
- name: Token
description: 用户信息
modelRef: String
parameterType: header
required: true
# 默认值只是方便本地开发时少填参数生产环境请禁用swagger或者禁用默认参数
defaultValue: "test"
- name: Authorization
description: 客户端信息
modelRef: String
parameterType: header
required: true
defaultValue: "bGFtcF93ZWI6bGFtcF93ZWJfc2VjcmV0"
- name: TenantId
description: 租户ID
modelRef: String
parameterType: header
required: true
defaultValue: "1"
- name: ApplicationId
description: 应用ID
modelRef: String
parameterType: header
required: true
defaultValue: "1"
echo: #详情看: EchoProperties
# 是否启用 远程数据 手动注入
enabled: true
# 是否启用 远程数据 注解AOP注入
aop-enabled: true
basePackages:
- com.krishna.basic
- com.krishna
# 字典类型 和 code 的分隔符
dictSeparator: '###'
# 多个字典code 之间的的分隔符
dictItemSeparator: ','
# 递归最大深度
maxDepth: 3
# 本地缓存配置信息 生产慎用
guavaCache:
enabled: false
maximumSize: 1000
refreshWriteTime: 2
refreshThreadPoolSize: 10
log: # 详情看OptLogProperties
# 开启记录操作日志
enabled: true
# 记录到什么地方 DB:mysql LOGGER:日志文件
type: DB
xss:
# 是否开启 xss 过滤器 详情看XssProperties
enabled: true
# 是否启用 RequestBody 注解标记的参数 反序列化时过滤XSS
requestBodyEnabled: false
ignoreParamValues:
- noxss
captcha:
# 登录界面的验证码配置 详情看CaptchaProperties
type: ARITHMETIC
width: 158
height: 58
len: 2
charType: 2
async: # 全局线程池配置
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
keepAliveSeconds: 300
threadNamePrefix: 'krishna-async-executor-'
server:
# 优雅停机
shutdown: GRACEFUL
servlet:
encoding:
enabled: true
charset: UTF-8
force: true
undertow:
threads:
io: 4 # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
worker: 80 # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
buffer-size: 2048 # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 , 每块buffer的空间大小,越小的空间被利用越充分
direct-buffers: true # 是否分配的直接内存
spring:
mvc:
pathmatch:
# 升级springboot2.6.6后临时处理防止swagger报错
matching-strategy: ANT_PATH_MATCHER
lifecycle:
# 优雅停机宽限期时间
timeout-per-shutdown-phase: 30s
servlet:
# 上传文件最大值
multipart:
max-file-size: 512MB
max-request-size: 512MB
# 通用dozer配置文件
dozer:
mappingFiles:
- classpath*:dozer/*.dozer.xml
management:
endpoints:
web:
base-path: /actuator
exposure:
include: '*'
endpoint:
health:
show-details: ALWAYS
enabled: true
feign:
httpclient:
enabled: false
okhttp:
enabled: true
hystrix:
enabled: false
sentinel:
enabled: true
client:
config:
default:
# feign client 调用全局超时时间
connectTimeout: 60000
readTimeout: 60000
#支持压缩的mime types
compression: # 请求压缩
request:
enabled: true
mime-types: text/xml,application/xml,application/json
min-request-size: 2048
response: # 响应压缩
enabled: true

View File

@@ -0,0 +1,169 @@
krishna:
druid-oracle: &druid-oracle
validation-query: SELECT 'x' FROM DUAL
druid-mysql: &druid-mysql
validation-query: SELECT 'x'
druid-sqlserver: &druid-sqlserver
validation-query: SELECT 'x'
oracle: &db-oracle
username: 'krishna_ds_c_defaults'
password: 'krishna_ds_c_defaults'
driverClassName: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@172.26.3.67:1521:helowin
mysql: &db-mysql
username: 'root'
password: 'root'
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/krishna_ds_c_defaults?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&nullCatalogMeansCurrent=true
sqlserver: &db-sqlserver
username: 'sa'
password: '1234@abcd'
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://172.26.3.67:1433;DatabaseName=krishna_ds_c_defaults
init:
separator: GO
database: # 字段介绍参考 DatabaseProperties
# COLUMN模式中隔离 租户 的列名 oracle数据库initDatabasePrefix不能超过11个字符
initDatabasePrefix:
- krishna_base
tenantIdColumn: 'created_org_id'
multiTenantType: DATASOURCE_COLUMN
# 是否不允许写入数据 WriteInterceptor
isNotWrite: false
# 是否启用数据权限
isDataScope: true
# 是否启用 sql性能规范插件
isBlockAttack: false
# 是否启用 sql性能规范插件
isIllegalSql: false
# 是否启用分布式事务
isSeata: false
# 生产环境请设置p6spy = false
p6spy: true
# 单页分页条数限制
maxLimit: -1
# 溢出总页数后是否进行处理
overflow: true
# 生成 countSql 优化掉 join, 现在只支持 left join
optimizeJoin: true
# id生成策略
id-type: CACHE
hutoolId:
workerId: 0
dataCenterId: 0
cache-id:
time-bits: 31
worker-bits: 22
seq-bits: 10
epochStr: '2020-09-15'
boost-power: 3
padding-factor: 50
# mysql 通用配置
spring:
autoconfigure:
exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
datasource:
dynamic:
enabled: true
# 从这里开始(dynamic),中间的这段配置用于 krishna.database.multiTenantType == DATASOURCE 时
p6spy: ${krishna.database.p6spy:false}
seata: ${krishna.database.isSeata:false}
primary: "0"
datasource:
"0":
<<: *db-mysql
# <<: *db-sqlserver
# <<: *db-oracle
druid:
<<: *druid-mysql
# <<: *druid-oracle
# <<: *druid-sqlserver
initialSize: 10
minIdle: 10
maxActive: 200
max-wait: 60000
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
test-on-borrow: true
test-on-return: false
test-while-idle: true
time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
filters: stat,wall
wall:
enabled: true
strictSyntaxCheck: false
comment-allow: true
multiStatementAllow: true
noneBaseStatementAllow: true
# 从这里结束(dynamic),中间的这段配置用于 krishna.database.multiTenantType == DATASOURCE 时
druid:
enable: true
# 以下的2段配置同时适用于所有模式
web-stat-filter: # WebStatFilter配置说明请参考Druid Wiki配置_配置WebStatFilter
enabled: true
url-pattern: /*
exclusions: "*.js , *.gif ,*.jpg ,*.png ,*.css ,*.ico , /druid/*"
session-stat-max-count: 1000
profile-enable: true
session-stat-enable: false
stat-view-servlet: #展示Druid的统计信息,StatViewServlet的用途包括1.提供监控信息展示的html页面2.提供监控信息的JSON API
enabled: true
url-pattern: /druid/* #根据配置中的url-pattern来访问内置监控页面如果是上面的配置内置监控页面的首页是/druid/index.html例如http://127.0.0.1:9000/druid/index.html
reset-enable: true #允许清空统计数据
login-username: ''
login-password: ''
# 允许访问IP
allow: ''
mybatis-plus:
mapper-locations:
- classpath*:mapper_**/**/*Mapper.xml
#实体扫描多个package用逗号或者分号分隔
typeAliasesPackage: com.krishna.*.entity;com.basic.database.mybatis.typehandler
typeEnumsPackage: com.krishna.*.enumeration
global-config:
db-config:
id-type: INPUT
insert-strategy: NOT_NULL
update-strategy: NOT_NULL
where-strategy: NOT_EMPTY
configuration:
#配置返回数据库(column下划线命名&&返回java实体是驼峰命名)自动匹配无需as没开启这个SQL需要写as select user_id as userId
map-underscore-to-camel-case: true
cache-enabled: false
#配置JdbcTypeForNull, oracle数据库必须配置
jdbc-type-for-null: 'null'
default-enum-type-handler: com.krishna.basic.database.mybatis.handlers.MybatisEnumTypeHandler
# 分布式事务相关
seata:
enabled: ${krishna.database.isSeata}
enableAutoDataSourceProxy: ${krishna.database.isSeata}
tx-service-group: krishna_cloud_seata_tx_group
registry:
type: nacos
nacos:
server-addr: ${krishna.nacos.ip}:${krishna.nacos.port}
username: ${krishna.nacos.username}
password: ${krishna.nacos.password}
namespace: ${krishna.seata.namespace}
config:
type: nacos
nacos:
server-addr: ${krishna.nacos.ip}:${krishna.nacos.port}
username: ${krishna.nacos.username}
password: ${krishna.nacos.password}
namespace: ${krishna.seata.namespace}
dataId: seataServer.properties
service:
grouplist:
default: ${krishna.seata.ip:}:${krishna.seata.port:}
vgroup-mapping:
krishna_cloud_seata_tx_group: default
disable-global-transaction: false
client:
rm:
report-success-enable: false

View File

@@ -0,0 +1,82 @@
krishna:
database:
# 是否启用分布式事务. 为了大家上手简单默认关闭但关闭后存在分布式事务不一致可能生产一定设置为true并启动seata
isSeata: false
# initDatabasePrefix:
# - krishna_local_ds_c_base
swagger:
enabled: true
docket:
common:
title: 基础服务-公共模块
base-package: com.krishna.base.controller.common
user:
title: 基础服务-用户模块
base-package: com.krishna.base.controller.user
system:
title: 基础服务-系统模块
base-package: com.krishna.base.controller.system
file:
title: 基础服务-文件模块
base-package: com.krishna.file.controller
msg:
title: 基础服务-消息模块
base-package: com.krishna.msg.controller;com.krishna.sms.controller
file:
storageType: HUAWEI_OSS # FAST_DFS LOCAL MIN_IO ALI_OSS HUAWEI_OSS QINIU_OSS
delFile: false
publicBucket:
- public
local:
storagePath: /Users/leiyuewei/data/projects/uploadfile/file/ # 文件存储路径 某些版本的 window 需要改成 D:\\data\\projects\\uploadfile\\file\\
urlPrefix: http://127.0.0.1/file/ # 文件访问 部署nginx后配置nginx的ip并配置nginx静态代理storage-path地址的静态资源
innerUrlPrefix: null # 内网的url前缀
fastDfs:
urlPrefix: https://fastdfs.krishna.top/
ali:
# 请填写自己的阿里云存储配置
urlPrefix: "https://krishna-admin-cloud.oss-cn-beijing.aliyuncs.com/"
bucket: "krishna-admin-cloud"
endpoint: "oss-cn-beijing.aliyuncs.com"
accessKeyId: "填写你的id"
accessKeySecret: "填写你的秘钥"
minIo:
endpoint: "https://static.krishna.top/"
accessKey: "krishna"
secretKey: "ZHadmin123."
bucket: "dev"
huawei:
urlPrefix: "https://huawei.krishna.top/"
endpoint: "obs.cn-southwest-2.myhuaweicloud.com"
accessKey: "1"
secretKey: "2"
location: "cn-southwest-2"
bucket: "pjcp-public"
qiNiu:
domain: qiniu.krishna.top
useHttps: true
zone: "z0"
accessKey: "1"
secretKey: "2"
bucket: "krishna_admin_cloud"
#FAST_DFS配置
fdfs:
soTimeout: 1500
connectTimeout: 600
thumb-image:
width: 150
height: 150
tracker-list:
- 39.108.109.234:22122
pool:
#从池中借出的对象的最大数目
max-total: 153
max-wait-millis: 102
jmx-name-base: 1
jmx-name-prefix: 1
server:
port: 18764

View File

@@ -0,0 +1,75 @@
krishna:
log:
enabled: false
webmvc:
undertow: false
header: false
authentication:
jwtSignKey: 'krishna-cloud_is_a_fantastic_project'
database:
initDatabasePrefix:
- krishna_base
ignore:
# 是否启用网关的 uri权限鉴权 (设置为false则后台不校验访问权限)
authEnabled: true
# 前端校验按钮 是否区分大小写
caseSensitive: false
anyone: # 请求中 需要携带Tenant 且 需要携带Token(需要登录)但不需要验证uri权限
ALL:
- /**/anyone/**
anyUser: # 请求中 需要携带Tenant但 不需要携带Token(不需要登录) 和 不需要验证uri权限
ALL:
- /**/anyUser/**
anyTenant: # 请求中 不需要携带Tenant 且 不需要携带Token(不需要登录) 和 不需要验证uri权限
ALL:
- /**/anyTenant/**
spring:
autoconfigure:
exclude: io.seata.integration.http.HttpAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
cloud:
gateway:
x-forwarded:
prefixEnabled: false
discovery:
locator:
enabled: true
lowerCaseServiceId: true
routes:
# 新建服务配置复制到中间
# 新建服务配置复制到中间
- id: oauth
uri: lb://krishna-oauth-server
predicates:
- Path=/oauth/**
filters:
- StripPrefix=1
- id: system
uri: lb://krishna-system-server
predicates:
- Path=/system/**
filters:
- StripPrefix=1
- id: base
uri: lb://krishna-base-server
predicates:
- Path=/base/**
filters:
- StripPrefix=1
# websocket
- id: wsMsg
uri: lb:ws://krishna-base-server
predicates:
- Path=/wsMsg/**
filters:
- StripPrefix=1
- id: generator
uri: lb://krishna-generator-server
predicates:
- Path=/generator/**
filters:
- StripPrefix=1
server:
port: 18760
servlet:
context-path: /api

View File

@@ -0,0 +1,4 @@
spring:
datasource:
dynamic:
seata: false

View File

@@ -0,0 +1,22 @@
server:
port: 18762
servlet:
context-path: /${spring.application.name} # 监控系统项目名
spring:
security:
user:
name: krishna
password: krishna
roles: USER
management:
endpoints:
web:
base-path: /actuator
exposure:
include: '*'
endpoint:
health:
show-details: ALWAYS
enabled: true

View File

@@ -0,0 +1,16 @@
server:
port: 18773
krishna:
database:
isSeata: false
# initDatabasePrefix:
# - krishna_local_ds_c_base
swagger:
title: 认证服务
base-package: top.tangyh.krishna
authentication:
expire: 28800 # token有效期为8小时
refreshExpire: 86400 # 刷新token有效期为24小时
# jwt 签名长度至少32位
jwtSignKey: 'krishna-cloud_is_a_fantastic_project'

View File

@@ -0,0 +1,20 @@
krishna:
database:
isSeata: false
# 若你的业务服务需要连接不同的租户库,请在这里配置多个租户库前缀,并在业务服务配置对应的租户库前缀。
# initDatabasePrefix:
# - krishna_local_ds_c_base
# - krishna_ds_c_extend
swagger:
docket:
tenant:
title: 租户服务-租户模块
base-package: com.krishna.system.controller.tenant
system:
title: 租户服务-系统设置模块
base-package: com.krishna.system.controller.system
appliction:
title: 租户服务-应用资源模块
base-package: com.krishna.system.controller.application
server:
port: 18778

View File

@@ -0,0 +1,18 @@
krishna:
rabbitmq:
# 若系统中有除了zipkin之外的地方使用了mq 则一定不能设置成false
enabled: false
ip: 127.0.0.1
port: 5672
username: 'krishna'
password: 'krishna'
spring:
rabbitmq:
enabled: ${krishna.rabbitmq.enabled}
host: ${krishna.rabbitmq.ip}
port: ${krishna.rabbitmq.port}
username: ${krishna.rabbitmq.username}
password: ${krishna.rabbitmq.password}
listener:
type: direct # simple direct

22
doc/nacos配置/redis.yml Normal file
View File

@@ -0,0 +1,22 @@
krishna:
cache:
type: REDIS
# serializerType: ProtoStuff
serializerType: JACK_SON
cacheNullVal: true
redis:
# ip: 106.53.26.9
ip: 127.0.0.1
port: 16379
password: 'SbtyMveYNfLzTks7H0apCmyStPzWJqjy'
database: 15
spring:
cache:
type: GENERIC
redis:
host: ${krishna.redis.ip}
password: ${krishna.redis.password}
port: ${krishna.redis.port}
database: ${krishna.redis.database}

View File

@@ -0,0 +1,70 @@
framework:
swagger:
version: '@project.version@'
nacos:
ip: ${NACOS_IP:@nacos.ip@}
port: ${NACOS_PORT:@nacos.port@}
namespace: ${NACOS_NAMESPACE:@nacos.namespace@}
username: ${NACOS_USERNAME:@nacos.username@}
password: ${NACOS_PASSWORD:@nacos.password@}
seata:
ip: ${SEATA_IP:@seata.ip@}
port: ${SEATA_PORT:@seata.port@}
namespace: ${SEATA_NAMESPACE:@seata.namespace@}
sentinel:
dashboard: ${SENTINEL_DASHBOARD:@sentinel.dashboard@}
spring:
main:
allow-bean-definition-overriding: true
application:
name: @project.artifactId@
# framework自定义配置用于framework-scan-starter扫描接口时拼接uri前缀。 需要和网关配置的前缀一致
path: /base
profiles:
active: @profile.active@
cloud:
sentinel:
enabled: true
filter:
enabled: true
eager: true # 取消Sentinel控制台懒加载
transport:
dashboard: ${framework.sentinel.dashboard}
nacos:
config:
server-addr: ${framework.nacos.ip}:${framework.nacos.port}
file-extension: yml
namespace: ${framework.nacos.namespace}
shared-configs:
- dataId: common.yml
refresh: true
- dataId: redis.yml
refresh: false
- dataId: database.yml
refresh: true
- dataId: rabbitmq.yml
refresh: false
enabled: true
username: ${framework.nacos.username}
password: ${framework.nacos.password}
discovery:
username: ${framework.nacos.username}
password: ${framework.nacos.password}
server-addr: ${framework.nacos.ip}:${framework.nacos.port}
namespace: ${framework.nacos.namespace}
metadata: # 元数据,用于权限服务实时获取各个服务的所有接口
management.context-path: ${server.servlet.context-path:}${spring.mvc.servlet.path:}${management.endpoints.web.base-path:}
gray_version: zuihou
logging:
file:
path: '@logging.file.path@'
name: ${logging.file.path}/${spring.application.name}/root.log
config: classpath:logback-spring.xml
# 用于/actuator/info
info:
name: '@project.name@'
description: '@project.description@'
version: '@project.version@'

View File

@@ -1,9 +1,9 @@
# \u5728\u8FD9\u4E2A\u914D\u7F6E\u6587\u4EF6\u4E2D\u914D\u7F6E\u7684\u5C5E\u6027\uFF0C\u662F\u6240\u6709\u670D\u52A1\u5747\u9700\u8981\u7684\u7EDF\u4E00\u7684\u914D\u7F6E\uFF0C\u4E14\u4E0D\u80FD\u914D\u7F6E\u5728nacos\u4E2D
# \u5FAE\u670D\u52A1\u5BA2\u6237\u7AEF\u9700\u8981 \u914D\u7F6E\u7684 nacos \u670D\u52A1\u7AEF\u7684ip\u7B49\u4FE1\u606F
nacos.ip=framework.com
nacos.ip=192.168.0.9
nacos.port=8848
# \u72EC\u7ACB\u547D\u540D\u7A7A\u95F4\u907F\u514D\u8DDF\u522B\u7684\u9879\u76EE\u51B2\u7A81
nacos.namespace=0361a564-eb23-4d6c-adfc-b0aceb6ecadd
nacos.namespace=233f6051-a85b-4c17-bfff-2372dcaf1419
nacos.username=nacos
nacos.password=nacos

View File

@@ -1,8 +1,8 @@
nacos.ip=172.30.30.194
nacos.ip=192.168.0.9
nacos.port=8848
nacos.namespace=5b617fec-3f4a-487f-a5af-b2d462e7b36c
nacos.namespace=233f6051-a85b-4c17-bfff-2372dcaf1419
nacos.username=nacos
nacos.password=ZHadmin123.
nacos.password=nacos.
# seata \u5BA2\u6237\u7AEF\u4ECE nacos \u62C9\u53D6\u914D\u7F6E\u548C\u6CE8\u518C\u7684\u547D\u540D\u7A7A\u95F4 \u8DDF nacos.namespace \u533A\u5206\u51FA\u6765\uFF0C\u539F\u56E0\u662F seata
seata.namespace=f65008d9-37f1-45ce-88eb-fba641041065