Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
7c2b98de
Commit
7c2b98de
authored
Aug 11, 2021
by
李传峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将ResourceUtils改为包内访问,禁止外部使用避免错误
parent
9cd3a088
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ResourceUtils.java
.../src/main/java/com/pcloud/common/utils/ResourceUtils.java
+5
-5
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/ResourceUtils.java
View file @
7c2b98de
...
@@ -14,8 +14,8 @@ import java.util.ResourceBundle;
...
@@ -14,8 +14,8 @@ import java.util.ResourceBundle;
* @创建时间:2016年3月10日,上午11:46:33
* @创建时间:2016年3月10日,上午11:46:33
* @版本:1.0
* @版本:1.0
*/
*/
public
class
ResourceUtils
{
class
ResourceUtils
{
private
ResourceBundle
resourceBundle
;
private
ResourceBundle
resourceBundle
;
private
ResourceUtils
(
String
resource
)
{
private
ResourceUtils
(
String
resource
)
{
resourceBundle
=
ResourceBundle
.
getBundle
(
resource
);
resourceBundle
=
ResourceBundle
.
getBundle
(
resource
);
...
@@ -26,7 +26,7 @@ private ResourceBundle resourceBundle;
...
@@ -26,7 +26,7 @@ private ResourceBundle resourceBundle;
* @param resource 资源
* @param resource 资源
* @return 解析
* @return 解析
*/
*/
public
static
ResourceUtils
getResource
(
String
resource
)
{
static
ResourceUtils
getResource
(
String
resource
)
{
return
new
ResourceUtils
(
resource
);
return
new
ResourceUtils
(
resource
);
}
}
...
@@ -36,7 +36,7 @@ private ResourceBundle resourceBundle;
...
@@ -36,7 +36,7 @@ private ResourceBundle resourceBundle;
* @param args value中参数序列,参数:{0},{1}...,{n}
* @param args value中参数序列,参数:{0},{1}...,{n}
* @return
* @return
*/
*/
public
String
getValue
(
String
key
,
Object
...
args
)
{
String
getValue
(
String
key
,
Object
...
args
)
{
String
temp
=
resourceBundle
.
getString
(
key
);
String
temp
=
resourceBundle
.
getString
(
key
);
return
MessageFormat
.
format
(
temp
,
args
);
return
MessageFormat
.
format
(
temp
,
args
);
}
}
...
@@ -45,7 +45,7 @@ private ResourceBundle resourceBundle;
...
@@ -45,7 +45,7 @@ private ResourceBundle resourceBundle;
* 获取所有资源的Map表示
* 获取所有资源的Map表示
* @return 资源Map
* @return 资源Map
*/
*/
public
Map
<
String
,
String
>
getMap
()
{
Map
<
String
,
String
>
getMap
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
for
(
String
key:
resourceBundle
.
keySet
())
{
for
(
String
key:
resourceBundle
.
keySet
())
{
map
.
put
(
key
,
resourceBundle
.
getString
(
key
));
map
.
put
(
key
,
resourceBundle
.
getString
(
key
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment