feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
package io.destiny.client;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication
|
||||
@ConfigurationPropertiesScan(basePackages = "io.destiny")
|
||||
@ComponentScan(basePackages = "io.destiny")
|
||||
public class ClientApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ClientApplication.class, args);
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
spring:
|
||||
r2dbc:
|
||||
url: r2dbc:postgresql://localhost:5432/everything_suitable_dev
|
||||
flyway:
|
||||
enabled: true
|
||||
locations: classpath:db/migration/dev
|
||||
url: jdbc:postgresql://localhost:5432/everything_suitable_dev
|
||||
username: postgres
|
||||
password: postgres
|
||||
|
||||
logging:
|
||||
level:
|
||||
io.destiny: DEBUG
|
||||
org.springframework.r2dbc: DEBUG
|
||||
org.springframework.web: DEBUG
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
spring:
|
||||
r2dbc:
|
||||
url: ${DB_URL:r2dbc:postgresql://prod-db:5432/everything_suitable}
|
||||
username: ${DB_USERNAME}
|
||||
password: ${DB_PASSWORD}
|
||||
flyway:
|
||||
enabled: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
io.destiny: INFO
|
||||
org.springframework.r2dbc: INFO
|
||||
org.springframework.web: INFO
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
server:
|
||||
port: 8081
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: client-app
|
||||
r2dbc:
|
||||
url: r2dbc:postgresql://localhost:5432/everything_suitable
|
||||
username: ${DB_USERNAME:postgres}
|
||||
password: ${DB_PASSWORD:postgres}
|
||||
pool:
|
||||
initial-size: 10
|
||||
max-size: 50
|
||||
flyway:
|
||||
enabled: true
|
||||
locations: classpath:db/migration
|
||||
cache:
|
||||
type: caffeine
|
||||
caffeine:
|
||||
spec: maximumSize=1000,expireAfterWrite=5m
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics,env,loggers
|
||||
base-path: /actuator
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
metrics:
|
||||
tags:
|
||||
application: ${spring.application.name}
|
||||
environment: ${spring.profiles.active}
|
||||
|
||||
logging:
|
||||
level:
|
||||
io.destiny: DEBUG
|
||||
org.springframework.r2dbc: DEBUG
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package io.destiny.client;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
class ClientApplicationIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private WebTestClient webTestClient;
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void healthCheck() {
|
||||
webTestClient.get()
|
||||
.uri("/actuator/health")
|
||||
.exchange()
|
||||
.expectStatus().isOk();
|
||||
}
|
||||
|
||||
@Test
|
||||
void metricsEndpointAccessible() {
|
||||
webTestClient.get()
|
||||
.uri("/actuator/metrics")
|
||||
.exchange()
|
||||
.expectStatus().isOk();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user