eureka:
instance:
prefer-ip-address:true #配置eureka.instance.prefer-ip-address = true 就可以将IP注册到Eureka Server上,而如果不配置就是机器的主机名
client:
service-url:
defaultZone:http://{
用户名}:{
密码}@路径:端口号/eureka/
spring:
application:
name: x-user #模块名,也就是注册到eureka上显示的
http:
multipart:
maxFileSize: 10MB #限定单个文件最大上传大小
maxRequestSize: 10MB #限定总上传的数据最大上传大小
profiles:
active: test #加载resourse下的application-test.yml
include: no-liquibase,swagger #配置swagger,如果不需要使用liqubase,就加上no-liquibase,否则不加
jackson:
seriallization.indent_output: true #springboot默认配置json转换工具jackson格式化输出
datasource:
type: com.zaxxer.hikari.HikariDataSource #数据源
url: jdbc:oracle:thin:@{
路径}:{
端口}:{
库名} #以链接Oracle数据库为例
username: {
用户名}
password: {
密码}
hikari:
SpringCloud中的application-test.yml剖析(以user模块为例)
最新推荐文章于 2024-03-07 10:27:19 发布
本文深入剖析Spring Cloud项目中application-test.yml的配置细节,以user模块为实例,探讨如何在微服务环境中有效配置和使用该文件,实现灵活的指令配合。
摘要由CSDN通过智能技术生成