我们来试一下就知道了
当前只有一个yml配置文件
SpringBoot中同时有yml和properties两种配置文件,springboot会加载哪个?
如果我再加一个properties配置文件,会是什么情况呢?
SpringBoot中同时有yml和properties两种配置文件,springboot会加载哪个?
启动一下看看
SpringBoot中同时有yml和properties两种配置文件,springboot会加载哪个?
结果是8082
删掉properties文件内容,端口会是8080还是加载yml的配置呢?
SpringBoot中同时有yml和properties两种配置文件,springboot会加载哪个?
事实是properties如果为空,会加载yml的配置内容,如果都为空,则默认8080
SpringBoot中同时有yml和properties两种配置文件,springboot会加载哪个?

相关文章:

  • 2022-02-08
  • 2021-05-02
  • 2022-12-23
  • 2021-09-10
  • 2022-01-07
  • 2022-12-23
  • 2021-05-20
猜你喜欢
  • 2022-12-23
  • 2021-06-07
  • 2021-06-01
  • 2021-11-21
  • 2021-08-28
  • 2021-05-24
  • 2021-08-11
相关资源
相似解决方案