Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
foc_manage
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
首航-临时账号
foc_manage
Commits
92e1cc25
Commit
92e1cc25
authored
Sep 25, 2024
by
罗胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-25
明文mysql密码
parent
3abbdef3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
10 deletions
+92
-10
jdbc.properties
resources/jdbc.properties
+2
-2
spring-context.xml
resources/spring-context.xml
+1
-1
DataBaseXml.java
src/com/ejweb/core/conf/DataBaseXml.java
+77
-0
GConstants.java
src/com/ejweb/core/conf/GConstants.java
+2
-0
IPSeeker.java
src/com/ejweb/core/geoip/IPSeeker.java
+3
-0
SailingFileService.java
src/com/ejweb/modules/airline/service/SailingFileService.java
+7
-7
No files found.
resources/jdbc.properties
View file @
92e1cc25
...
...
@@ -3,8 +3,8 @@ db.table.prefix=foc_
jdbc.type
=
mysql
jdbc.driver.class
=
com.mysql.jdbc.Driver
jdbc.url
=
jdbc:mysql://81.69.44.115:5508/jd_foc?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
=
sms_develop
jdbc.password
=
Develop2018!@#
jdbc.username
=
b849656b41d3eb136ad6a9d7328d4e6a
jdbc.password
=
33c9745f057ba48a41d8043f1a007100
#\u521d\u59cb\u5316\u8fde\u63a5
jdbc.initialSize
=
0
#\u8fde\u63a5\u6c60\u7684\u6700\u5927\u6d3b\u52a8\u4e2a\u6570
...
...
resources/spring-context.xml
View file @
92e1cc25
...
...
@@ -109,7 +109,7 @@
<task:annotation-driven
scheduler=
"scheduler"
executor=
"executor"
proxy-target-class=
"true"
/>
<!-- 数据源配置, 使用 BoneCP 数据库连接池 -->
<bean
id=
"dataSource"
class=
"com.
alibaba.druid.pool.DruidDataSource
"
<bean
id=
"dataSource"
class=
"com.
ejweb.core.conf.DataBaseXml
"
init-method=
"init"
destroy-method=
"close"
>
<!-- 数据源驱动类可不写,Druid默认会自动根据URL识别DriverClass -->
<property
name=
"driverClassName"
value=
"${jdbc.driver.class}"
/>
...
...
src/com/ejweb/core/conf/DataBaseXml.java
0 → 100644
View file @
92e1cc25
package
com
.
ejweb
.
core
.
conf
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.crypto.symmetric.SymmetricAlgorithm
;
import
cn.hutool.crypto.symmetric.SymmetricCrypto
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
DataBaseXml
extends
DruidDataSource
{
byte
[]
key
=
new
byte
[]{
43
,
-
113
,
127
,
14
,
-
39
,
99
,
-
3
,
-
26
,
50
,
31
,
-
98
,
-
61
,
-
46
,
61
,
56
,
120
};
/**
* Log4j logger
*/
private
final
static
Logger
lg
=
LoggerFactory
.
getLogger
(
DataBaseXml
.
class
);
@Override
public
String
getUrl
()
{
return
this
.
jdbcUrl
;
}
@Override
public
void
setUrl
(
String
jdbcUrl
)
{
this
.
jdbcUrl
=
jdbcUrl
;
}
@Override
public
String
getUsername
()
{
return
this
.
username
;
}
@Override
public
void
setUsername
(
String
username
)
{
lg
.
info
(
"数据库【username】解密初始化加载..."
);
try
{
SymmetricCrypto
aes
=
new
SymmetricCrypto
(
SymmetricAlgorithm
.
AES
,
key
);
username
=
aes
.
decryptStr
(
username
,
CharsetUtil
.
CHARSET_UTF_8
);
}
catch
(
Exception
e
)
{
lg
.
error
(
"数据库【username】密文解密失败..."
);
e
.
printStackTrace
();
}
this
.
username
=
username
;
}
@Override
public
String
getPassword
()
{
return
this
.
password
;
}
@Override
public
void
setPassword
(
String
password
)
{
lg
.
info
(
"数据库【password】解密初始化加载..."
);
try
{
SymmetricCrypto
aes
=
new
SymmetricCrypto
(
SymmetricAlgorithm
.
AES
,
key
);
password
=
aes
.
decryptStr
(
password
,
CharsetUtil
.
CHARSET_UTF_8
);
}
catch
(
Exception
e
)
{
lg
.
error
(
"数据库【password】密文解密失败..."
);
e
.
printStackTrace
();
}
this
.
password
=
password
;
}
}
src/com/ejweb/core/conf/GConstants.java
View file @
92e1cc25
...
...
@@ -465,4 +465,6 @@ public class GConstants {
}
return
projectPath
;
}
}
src/com/ejweb/core/geoip/IPSeeker.java
View file @
92e1cc25
...
...
@@ -14,6 +14,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.StringTokenizer
;
import
com.huawei.esdk.uc.professional.local.utils.AES128Utils
;
import
org.apache.log4j.Logger
;
import
org.geo.split.RegionEntity
;
import
org.geo.split.RegionSplit
;
...
...
@@ -66,6 +67,8 @@ public final class IPSeeker {
private
static
IPSeeker
INS
=
new
IPSeeker
();
private
IPSeeker
()
{
// String dir = GConstants.getValue("geoip.db.dir");
// try {
...
...
src/com/ejweb/modules/airline/service/SailingFileService.java
View file @
92e1cc25
...
...
@@ -73,7 +73,7 @@ public class SailingFileService extends CrudService<SailingFileDao, SailingFileE
// OutputStream os = null;
// ByteArrayOutputStream baos = null;
// String PATH_FORMAt = GConstants.getValue("file.path.format", "{yyyy}{mm}{dd}");
try
{
//
try {
// // 文件扩展名称不能为NULL
// if (StringUtils.isBlank(originalFilename)) {
// return null;
...
...
@@ -136,12 +136,12 @@ public class SailingFileService extends CrudService<SailingFileDao, SailingFileE
// os = new BufferedOutputStream(os);
// os.write(data);
// os.flush();
}
catch
(
Exception
e
)
{
}
finally
{
IOUtils
.
closeQuietly
(
os
);
IOUtils
.
closeQuietly
(
in
);
IOUtils
.
closeQuietly
(
baos
);
}
//
} catch (Exception e) {
//
} finally {
//
IOUtils.closeQuietly(os);
//
IOUtils.closeQuietly(in);
//
IOUtils.closeQuietly(baos);
//
}
return
sailingFile
;
}
...
...
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