-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharticle-41069.htm
205 lines (193 loc) · 14 KB
/
article-41069.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html xml:lang="zh-CN" lang="zh-CN">
<head>
<link rel="canonical" href="https://windowsv2ray.github.io/news/article-41069.htm" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>spring常用配置profile(设置不同的运行环境)使用纪要</title>
<meta name="description" content="spring常用配置——profile(设置不同的运行环境) 作用: Profile为不同环境下使用不同的配置提供了支持(例如:开发环境,生产环境及测试环境的配置, 这其中的配置一般都是不同的。)一" />
<link rel="icon" href="/assets/website/img/windowsv2ray/favicon.ico" type="image/x-icon"/>
<meta name="author" content="Windows V2ray分享订阅站">
<meta property="og:type" content="article" />
<meta property="og:url" content="https://windowsv2ray.github.io/news/article-41069.htm" />
<meta property="og:site_name" content="Windows V2ray分享订阅站" />
<meta property="og:title" content="spring常用配置profile(设置不同的运行环境)使用纪要" />
<meta property="og:image" content="https://windowsv2ray.github.io/uploads/20240604/d620109e10748697f0b95f7acbd88766.webp" />
<meta property="og:release_date" content="2025-01-15T09:50:45" />
<meta property="og:updated_time" content="2025-01-15T09:50:45" />
<meta property="og:description" content="spring常用配置——profile(设置不同的运行环境) 作用: Profile为不同环境下使用不同的配置提供了支持(例如:开发环境,生产环境及测试环境的配置, 这其中的配置一般都是不同的。)一" />
<meta name="applicable-device" content="pc,mobile" />
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta name="robots" content="max-image-preview:large" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="spring常用配置profile(设置不同的运行环境)使用纪要">
<meta name="format-detection" content="telephone=no">
<link rel="dns-prefetch" href="https:/www.googletagmanager.com">
<link rel="dns-prefetch" href="https://www.googleadservices.com">
<link rel="dns-prefetch" href="https://www.google-analytics.com">
<link rel="dns-prefetch" href="https://pagead2.googlesyndication.com">
<link rel="dns-prefetch" href="https://cm.g.doubleclick.net">
<link rel="stylesheet" href="/assets/website/js/frontend/windowsv2ray/animate/animate.css">
<link rel="stylesheet" href="/assets/website/css/windowsv2ray/bootstrap.css">
<link rel="stylesheet" href="/assets/website/css/windowsv2ray/maicons.css">
<link rel="stylesheet" href="/assets/website/js/frontend/windowsv2ray/owl-carousel/css/owl.carousel.css">
<link rel="stylesheet" href="/assets/website/css/windowsv2ray/theme.css">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JN82W0GJX5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-JN82W0GJX5');
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3332997411212854"
crossorigin="anonymous"></script>
</head>
<body data-page="detail">
<!-- Back to top button -->
<div class="back-to-top"></div>
<header>
<nav class="navbar navbar-expand-lg navbar-light navbar-float">
<div class="container">
<a href="/" class="navbar-brand">
<span>Windows V2ray</span>
</a>
<button class="navbar-toggler" data-toggle="collapse" data-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbarContent">
<ul class="navbar-nav ml-lg-4 pt-3 pt-lg-0">
<li class="nav-item">
<a href="/" class="nav-link">首页</a>
</li>
<li class="nav-item">
<a href="/free-nodes/" class="nav-link">免费节点</a>
</li>
<li class="nav-item">
<a href="/paid-subscribe/" class="nav-link">推荐机场</a>
</li>
<li class="nav-item">
<a href="/client.htm" class="nav-link">客户端</a>
</li>
<li class="nav-item">
<a href="/news/" class="nav-link">新闻资讯</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container mt-5">
<div class="page-banner">
<div class="row justify-content-center align-items-center h-100">
<div class="col-md-10">
<h1 class="text-center">spring常用配置profile(设置不同的运行环境)使用纪要</h1>
<nav aria-label="Breadcrumb">
<ul class="breadcrumb justify-content-center py-0 bg-transparent">
<li class="breadcrumb-item"><a href="/">首页</a></li>
<li class="breadcrumb-item"><a href="/news/">新闻资讯</a></li>
<li class="breadcrumb-item active">正文</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</header>
<main>
<div class="page-section">
<div class="container">
<div class="row">
<div class="col-md-9">
<input type="hidden" id="share-website-info" data-name="" data-url="">
<div id="content_views" class="htmledit_views"> <pre><code class="language-Go">spring常用配置——profile(设置不同的运行环境) 作用: Profile为不同环境下使用不同的配置提供了支持(例如:开发环境,生产环境及测试环境的配置, 这其中的配置一般都是不同的。)一般通过以下几种方式来配置环境信息 解决办法: 1. 通过设定Environment的ActiveProfiles来设定当前Context需要使用的配置环境,在开发中使 用@Profile注解类或者方法,达到不同情况实例化不同的bean 2. 通过设定jvm的spring.profiles.active参数来配置环境. (例如: application-dev.properties/application-pro.properties,然后只需要在application- .properties中制定dev还是pro就可以了) 3. web项目的话,一般在servlet的context parameter中设置. 说明: 此篇博文的应用背景是第二种情况,项目中使用jvm的配置方式来配置当前的环境;</code></pre> <p><img decoding="async" alt="" height="63" src="http://img.555519.xyz/uploads/20221230/e0d8d80daca8b7da9b85e83e1ef9d56e.jpg"></p> <p><img decoding="async" alt="" height="107" src="http://img.555519.xyz/uploads/20221230/48145bc14b5843ca1fb587a08fc0d6e2.jpg"></p> </p></div> <div class="clearfix"></div>
<div class="col-md-12 mt-5">
<p>上一个:<a href="/news/article-40588.htm">动物医院诊疗系统有哪些设备(动物医院诊疗程序)</a></p>
<p>下一个:<a href="/news/article-41070.htm">机器学习笔记:Python底层实现KNN</a></p>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">热门文章</h3>
</div>
<div class="panel-body">
<ul class="p-0 x-0" style="list-style: none;margin: 0;padding: 0;">
<li class="py-2"><a href="/free-nodes/2025-1-19-free-high-speed-nodes.htm" title="「1月19日」最高速度18.1M/S,2025年Shadowrocket/SSR/Clash/V2ray每天更新免费节点订阅链接">「1月19日」最高速度18.1M/S,2025年Shadowrocket/SSR/Clash/V2ray每天更新免费节点订阅链接</a></li>
<li class="py-2"><a href="/news/article-36640.htm" title="php代码审计之——phpstorm动态调试">php代码审计之——phpstorm动态调试</a></li>
<li class="py-2"><a href="/news/article-61655.htm" title="免费领养猫平台下载(免费领养猫平台下载什么软件)">免费领养猫平台下载(免费领养猫平台下载什么软件)</a></li>
<li class="py-2"><a href="/free-nodes/2025-1-10-free-subscribe-node.htm" title="「1月10日」最高速度20.3M/S,2025年V2ray/Shadowrocket/SSR/Clash每天更新免费节点订阅链接">「1月10日」最高速度20.3M/S,2025年V2ray/Shadowrocket/SSR/Clash每天更新免费节点订阅链接</a></li>
<li class="py-2"><a href="/news/article-47515.htm" title="Spring事件监听机制源码解析">Spring事件监听机制源码解析</a></li>
<li class="py-2"><a href="/news/article-54282.htm" title="PHP对象继承">PHP对象继承</a></li>
<li class="py-2"><a href="/news/article-41574.htm" title="动物疫苗打到人身上有事吗有影响吗知乎视频(动物注射疫苗)">动物疫苗打到人身上有事吗有影响吗知乎视频(动物注射疫苗)</a></li>
<li class="py-2"><a href="/news/article-50034.htm" title="如果我们将时间分量和日期分量作为DATEDIFF()函数的参数包括在内,MySQL将返回什么?">如果我们将时间分量和日期分量作为DATEDIFF()函数的参数包括在内,MySQL将返回什么?</a></li>
<li class="py-2"><a href="/news/article-52135.htm" title="广东领养宠物群微信怎么加(广东动物领养中心)">广东领养宠物群微信怎么加(广东动物领养中心)</a></li>
<li class="py-2"><a href="/free-nodes/2025-3-4-clash-windows.htm" title="「3月4日」最高速度21.5M/S,2025年V2ray/Shadowrocket/Clash/SSR每天更新免费节点订阅链接">「3月4日」最高速度21.5M/S,2025年V2ray/Shadowrocket/Clash/SSR每天更新免费节点订阅链接</a></li>
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">归纳</h3>
</div>
<div class="panel-body">
<ul class="p-0 x-0" style="list-style: none;margin: 0;padding: 0;">
<li class="py-2">
<h4><span class="badge" style="float: right;">12</span> <a href="/date/2025-03/" title="2025-03 归档">2025-03</a></h4>
</li>
<li class="py-2">
<h4><span class="badge" style="float: right;">84</span> <a href="/date/2025-02/" title="2025-02 归档">2025-02</a></h4>
</li>
<li class="py-2">
<h4><span class="badge" style="float: right;">83</span> <a href="/date/2025-01/" title="2025-01 归档">2025-01</a></h4>
</li>
</ul>
</div>
</div>
</div>
</div>
</div> <!-- .container -->
</div> <!-- .page-section -->
</main>
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col-sm-6 py-2">
<p id="copyright">
<p>
<a href="/">首页</a> |
<a href="/free-node/">免费节点</a> |
<a href="/news/">新闻资讯</a> |
<a href="/about-us.htm">关于我们</a> |
<a href="/disclaimer.htm">免责申明</a> |
<a href="/privacy.htm">隐私申明</a> |
<a href="/sitemap.xml">网站地图</a>
</p>
Windows V2ray分享订阅站 版权所有 Powered by WordPress
</p>
</div>
<div class="col-sm-6 py-2 text-right">
<div class="d-inline-block px-3">
<a href="#">Privacy</a>
</div>
<div class="d-inline-block px-3">
<a href="#">Contact Us</a>
</div>
</div>
</div>
</div> <!-- .container -->
</footer> <!-- .page-footer -->
<script src="/assets/website/js/frontend/windowsv2ray/jquery-3.5.1.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/bootstrap.bundle.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/wow/wow.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/owl-carousel/js/owl.carousel.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/waypoints/jquery.waypoints.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/animateNumber/jquery.animateNumber.min.js"></script>
<script src="/assets/website/js/frontend/windowsv2ray/theme.js"></script>
<script src="https://www.freeclashnode.com/assets/js/frontend/invite-url.js"></script>
<script src="/assets/website/js/frontend/G.js"></script>
</body>
</html>