Java:SpringBoot中多环境配置和@Profile注解

CSDN头条 2年前 (2023) csdnhot
1.4K 0

内容简介:

目录

一、使用@Profile

1.1、@Profile修饰类
1.2、@Profile修饰方法
1.3、@Profile修饰注解

二、激活@Profile

2.1、配置文件方式激活@Profile
2.2、命令行方式激活@Profile

三、多Profile资源文件

一、使用@Profile

1.1、@Profile修饰类
开发环境
package com.example.demo.config;

import com.example.demo.entity.AppData;
import org.springframework.context.anno...

查看原文

? Java:SpringBoot中多环境配置和@Profile注解

版权声明:csdnhot 发表于 2023-01-19 3:46:53。
转载请注明:Java:SpringBoot中多环境配置和@Profile注解 | 程序员导航网

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...