mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
开启应用监控
This commit is contained in:
@@ -131,6 +131,14 @@
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-registry-nacos</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 项目相关配置
|
||||
jsowell:
|
||||
# 名称
|
||||
name: jsowell-service
|
||||
name: wcc-service
|
||||
# 版本
|
||||
version: 1.0.0
|
||||
# 版权年份
|
||||
@@ -51,6 +51,8 @@ user:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
application:
|
||||
name: jsowell-charger-web
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
@@ -71,6 +73,21 @@ spring:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
|
||||
# 监控配置
|
||||
management:
|
||||
server:
|
||||
port: 8091
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
metrics:
|
||||
tags:
|
||||
application: ${spring.application.name}
|
||||
export:
|
||||
prometheus:
|
||||
enabled: true
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
|
||||
@@ -110,6 +110,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
.antMatchers("/actuator/**").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
|
||||
20
pom.xml
20
pom.xml
@@ -34,7 +34,7 @@
|
||||
<jwt.version>0.9.1</jwt.version>
|
||||
<lombok.version>1.18.24</lombok.version>
|
||||
<guava.version>20.0</guava.version>
|
||||
<spring.boot.test.version>2.5.14</spring.boot.test.version>
|
||||
<spring.boot.version>2.5.14</spring.boot.version>
|
||||
<netty-all.version>4.1.75.Final</netty-all.version>
|
||||
<mqttv3.version>1.2.5</mqttv3.version>
|
||||
<mqtt-codec.version>1.2.5</mqtt-codec.version>
|
||||
@@ -57,11 +57,23 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.5.14</version>
|
||||
<version>${spring.boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<version>2.5.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||
<version>1.7.12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里数据库连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
@@ -229,7 +241,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${spring.boot.test.version}</version>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -389,6 +401,8 @@
|
||||
<artifactId>nacos-client</artifactId>
|
||||
<version>${nacos-client.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user