API 参考
完整配置示例
完整配置示例。
完整配置示例
以下是一个完整的配置示例,展示如何组织 Nebula 框架的配置:
application.yml (通用配置)
spring:
application:
name: my-service
profiles:
active: dev
server:
port: 8080
nebula:
data:
persistence:
enabled: true
primary: primary
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
type-aliases-package: com.example.entity
cache:
enabled: true
type: redis
web:
enabled: true
response:
enabled: true
task:
enabled: true
application-dev.yml (开发环境配置)
nebula:
data:
persistence:
sources:
primary:
url: jdbc:mysql://localhost:3306/mydb
username: root
password: password
cache:
redis:
host: localhost
port: 6379
messaging:
rabbitmq:
enabled: true
host: localhost
port: 5672
username: guest
password: guest
discovery:
nacos:
enabled: true
server-addr: localhost:8848
storage:
minio:
enabled: true
endpoint: http://localhost:9000
access-key: minioadmin
secret-key: minioadmin