增加SBA健康监控&增加多环境配置文件
This commit is contained in:
@@ -143,7 +143,17 @@
|
||||
<artifactId>ganymed-ssh2</artifactId>
|
||||
<version>262</version>
|
||||
</dependency>
|
||||
|
||||
<!--监控-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>2.7.8</version>
|
||||
</dependency>
|
||||
<!--暴露端点-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -48,6 +48,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// 对于登录接口 允许匿名访问
|
||||
.antMatchers("/auth/login").permitAll()
|
||||
.antMatchers("/ws/**").permitAll()
|
||||
.antMatchers("/actuator/**").permitAll()
|
||||
.antMatchers("/system/isFirstUse").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated();
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
server:
|
||||
port: 6081
|
||||
spring:
|
||||
#MySQL配置
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.1.103:3307/noodles?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: rootroot
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 2MB
|
||||
max-request-size: 5MB
|
||||
#Redis配置
|
||||
redis:
|
||||
host: 192.168.1.103
|
||||
database: 3
|
||||
#RabbitMq配置
|
||||
rabbitmq:
|
||||
host: 192.168.1.103
|
||||
port: 5672
|
||||
username: mzaxd
|
||||
password: 200712
|
||||
#配置SpringBootAdmin
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://192.168.1.90:8324 #配置 Admin Server的地址
|
||||
instance:
|
||||
service-host-type: ip
|
||||
# 开放健康检查接口
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "*"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
|
||||
mybatis-plus:
|
||||
#打印SQL日志 建议生产环境关掉 否则日志爆炸
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: delFlag
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
id-type: auto
|
||||
pagehelper:
|
||||
auto-dialect: on
|
||||
reasonable: true
|
||||
support-methods-arguments: true
|
||||
page-size-zero: true
|
||||
@@ -0,0 +1,55 @@
|
||||
server:
|
||||
port: 6081
|
||||
spring:
|
||||
#MySQL配置
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.1.103:3307/noodles?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: rootroot
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 2MB
|
||||
max-request-size: 5MB
|
||||
#Redis配置
|
||||
redis:
|
||||
host: 192.168.1.103
|
||||
database: 3
|
||||
#RabbitMq配置
|
||||
rabbitmq:
|
||||
host: 192.168.1.103
|
||||
port: 5672
|
||||
username: mzaxd
|
||||
password: 200712
|
||||
#配置SpringBootAdmin
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://192.168.1.90:8324 #配置 Admin Server的地址
|
||||
instance:
|
||||
service-host-type: ip #显示ip地址而不是默认的主机名
|
||||
# 开放健康检查接口
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: "*"
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
|
||||
mybatis-plus:
|
||||
#打印SQL日志 建议生产环境关掉 否则日志爆炸
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: delFlag
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
id-type: auto
|
||||
pagehelper:
|
||||
auto-dialect: on
|
||||
reasonable: true
|
||||
support-methods-arguments: true
|
||||
page-size-zero: true
|
||||
@@ -1,39 +1,3 @@
|
||||
server:
|
||||
port: 6081
|
||||
spring:
|
||||
#MySQL配置
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.1.103:3307/noodles?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: rootroot
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 2MB
|
||||
max-request-size: 5MB
|
||||
#Redis配置
|
||||
redis:
|
||||
host: 192.168.1.103
|
||||
database: 3
|
||||
#RabbitMq配置
|
||||
rabbitmq:
|
||||
host: 192.168.1.103
|
||||
port: 5672
|
||||
username: mzaxd
|
||||
password: 200712
|
||||
|
||||
mybatis-plus:
|
||||
#打印SQL日志 建议生产环境关掉 否则日志爆炸
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: delFlag
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
id-type: auto
|
||||
pagehelper:
|
||||
auto-dialect: on
|
||||
reasonable: true
|
||||
support-methods-arguments: true
|
||||
page-size-zero: true
|
||||
profiles:
|
||||
active: prod
|
||||
Reference in New Issue
Block a user