Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
Project
Project
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
15所TongWeb
aserver
Commits
f4f0c4a9
Commit
f4f0c4a9
authored
Dec 21, 2020
by
李德才
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存各系统所在服务器SN码到配置文件
parent
099c8dfc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
SnController.java
...ain/java/com/archser/aserver/controller/SnController.java
+5
-1
SnService.java
src/main/java/com/archser/aserver/service/SnService.java
+4
-0
PropertyUtil.java
src/main/java/com/archser/aserver/util/PropertyUtil.java
+0
-2
SN.properties
src/main/webapp/SN.properties
+0
-3
No files found.
src/main/java/com/archser/aserver/controller/SnController.java
View file @
f4f0c4a9
...
@@ -20,7 +20,11 @@ public class SnController extends Controller {
...
@@ -20,7 +20,11 @@ public class SnController extends Controller {
public
void
getPropertiesValue
()
{
public
void
getPropertiesValue
()
{
String
cupCode
=
getPara
(
"cupCode"
);
String
cupCode
=
getPara
(
"cupCode"
);
try
{
try
{
renderJson
(
Ret
.
ok
(
"snCode"
,
snService
.
getPropertiesValue
(
cupCode
)));
String
propertiesValue
=
snService
.
getPropertiesValue
(
cupCode
);
if
(
propertiesValue
==
null
)
{
snService
.
saveSnCode
(
cupCode
);
}
renderJson
(
Ret
.
ok
(
"snCode"
,
propertiesValue
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
renderJson
(
Ret
.
fail
());
renderJson
(
Ret
.
fail
());
...
...
src/main/java/com/archser/aserver/service/SnService.java
View file @
f4f0c4a9
...
@@ -36,4 +36,8 @@ public class SnService {
...
@@ -36,4 +36,8 @@ public class SnService {
}
}
public
void
saveSnCode
(
String
cpuCode
){
PropertyUtil
.
setProperty
(
cpuCode
,
""
,
FILE_PATH
);
}
}
}
src/main/java/com/archser/aserver/util/PropertyUtil.java
View file @
f4f0c4a9
package
com
.
archser
.
aserver
.
util
;
package
com
.
archser
.
aserver
.
util
;
import
com.jfinal.kit.PropKit
;
import
java.io.BufferedReader
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
...
@@ -10,7 +9,6 @@ import java.io.InputStream;
...
@@ -10,7 +9,6 @@ import java.io.InputStream;
import
java.io.InputStreamReader
;
import
java.io.InputStreamReader
;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.io.OutputStreamWriter
;
import
java.io.OutputStreamWriter
;
import
java.io.UnsupportedEncodingException
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Properties
;
import
java.util.Properties
;
...
...
src/main/webapp/SN.properties
View file @
f4f0c4a9
#III
#Thu Dec 03 09:31:25 CST 2020
AAA
=
数字档案室3,cdcsdcdscd
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