Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
d254e8a2
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
11 个月 前同步成功
通知
76
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d254e8a2
编写于
4月 02, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v1.3 RC
上级
d10d444b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
417 addition
and
432 deletion
+417
-432
maxkey-core/src/main/java/org/maxkey/config/CharacterEncodingConfig.java
.../main/java/org/maxkey/config/CharacterEncodingConfig.java
+68
-89
maxkey-core/src/main/java/org/maxkey/config/DataSoruceConfig.java
...ore/src/main/java/org/maxkey/config/DataSoruceConfig.java
+161
-167
maxkey-core/src/main/java/org/maxkey/config/EmailConfig.java
maxkey-core/src/main/java/org/maxkey/config/EmailConfig.java
+101
-105
maxkey-core/src/main/java/org/maxkey/config/LoginConfig.java
maxkey-core/src/main/java/org/maxkey/config/LoginConfig.java
+11
-3
maxkey-core/src/main/java/org/maxkey/config/oidc/OIDCProviderMetadataDetails.java
...a/org/maxkey/config/oidc/OIDCProviderMetadataDetails.java
+60
-62
maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java
.../src/main/java/org/maxkey/web/InitApplicationContext.java
+16
-6
未找到文件。
maxkey-core/src/main/java/org/maxkey/config/CharacterEncodingConfig.java
浏览文件 @
d254e8a2
/**
*
*/
package
org.maxkey.config
;
import
java.io.UnsupportedEncodingException
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
/**
* 字符集转换及转换配置
* 字符集转换及转换配置.
*
* @author Crystal.Sea
*
*/
@Configuration
@PropertySource
(
"classpath:/config/applicationConfig.properties"
)
public
class
CharacterEncodingConfig
{
/**
* 源字符集
*/
@Value
(
"${config.characterencoding.charset.from}"
)
String
fromCharSet
;
/**
* 目标字符集
*/
@Value
(
"${config.characterencoding.charset.to}"
)
String
toCharSet
;
/**
* 转换标志
*/
@Value
(
"${config.characterencoding.encoding}"
)
boolean
encoding
=
false
;
public
CharacterEncodingConfig
()
{
}
/**
* @return the fromCharSet
*/
public
String
getFromCharSet
()
{
return
fromCharSet
;
}
/**
* @param fromCharSet the fromCharSet to set
*/
public
void
setFromCharSet
(
String
fromCharSet
)
{
this
.
fromCharSet
=
fromCharSet
;
}
/**
* @return the toCharSet
*/
public
String
getToCharSet
()
{
return
toCharSet
;
}
/**
* @param toCharSet the toCharSet to set
*/
public
void
setToCharSet
(
String
toCharSet
)
{
this
.
toCharSet
=
toCharSet
;
}
/**
* @return the encoding
*/
public
boolean
isEncoding
()
{
return
encoding
;
}
/**
* @param encoding the encoding to set
*/
public
void
setEncoding
(
boolean
encoding
)
{
this
.
encoding
=
encoding
;
}
/**
* 字符集转换
* @param encodingString 源字符串
* @return encoded目标字符串
*/
public
String
encoding
(
String
encodingString
){
if
(!
this
.
encoding
||
encodingString
==
null
)
{
return
encodingString
;
}
try
{
return
new
String
(
encodingString
.
getBytes
(
this
.
fromCharSet
),
this
.
toCharSet
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 源字符集.
*/
@Value
(
"${config.characterencoding.charset.from}"
)
String
fromCharSet
;
/**
* 目标字符集.
*/
@Value
(
"${config.characterencoding.charset.to}"
)
String
toCharSet
;
/**
* 转换标志.
*/
@Value
(
"${config.characterencoding.encoding}"
)
boolean
encoding
=
false
;
public
CharacterEncodingConfig
()
{
}
public
String
getFromCharSet
()
{
return
fromCharSet
;
}
public
void
setFromCharSet
(
String
fromCharSet
)
{
this
.
fromCharSet
=
fromCharSet
;
}
public
String
getToCharSet
()
{
return
toCharSet
;
}
public
void
setToCharSet
(
String
toCharSet
)
{
this
.
toCharSet
=
toCharSet
;
}
public
boolean
isEncoding
()
{
return
encoding
;
}
public
void
setEncoding
(
boolean
encoding
)
{
this
.
encoding
=
encoding
;
}
/**
* 字符集转换.
*
* @param encodingString 源字符串
* @return encoded目标字符串
*/
public
String
encoding
(
String
encodingString
)
{
if
(!
this
.
encoding
||
encodingString
==
null
)
{
return
encodingString
;
}
try
{
return
new
String
(
encodingString
.
getBytes
(
this
.
fromCharSet
),
this
.
toCharSet
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
maxkey-core/src/main/java/org/maxkey/config/DataSoruceConfig.java
浏览文件 @
d254e8a2
...
...
@@ -7,177 +7,171 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
/*
*
* 数据源配置
/*
* 数据源配置
.
*
* @author Crystal.Sea
* dataSource.driverClassName=com.mysql.jdbc.Driver
* dataSource.url=jdbc:mysql://192.168.1.49/parasecdb?autoReconnect=true&characterEncoding=UTF-8
* dataSource.username=root
* dataSource.password=connsec
* dataSource.type=mysql
*
*/
/**
* @author Crystal.Sea
* @author Crystal.Sea
* dataSource.driverClassName=com.mysql.jdbc.Driver
* dataSource.url=jdbc:mysql://192.168.1.49/parasecdb?autoReconnect=true&characterEncoding=UTF-8
* dataSource.username=root
* dataSource.password=connsec
* dataSource.type=mysql
*
*/
@Configuration
@PropertySource
(
"classpath:/config/applicationConfig.properties"
)
public
class
DataSoruceConfig
{
/**
* 数据库类型
*/
@Value
(
"${config.datasource.database:mysql}"
)
String
database
;
/**
* jdbc驱动类
*/
@Value
(
"${config.datasource.driverclass:com.mysql.jdbc.Driver}"
)
String
driverClass
;
/**
* jdbc连接地址
*/
@Value
(
"${config.datasource.url:jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8}"
)
String
url
;
/**
* 数据库用户名
*/
@Value
(
"${config.datasource.username:root}"
)
String
username
;
/**
* 数据库密码
*/
@Value
(
"${config.datasource.password:maxkey}"
)
String
password
;
/**
* 数据库密码是否加密
*/
@Value
(
"${config.datasource.password.encrypt}"
)
boolean
encrypt
=
false
;
/**
* 数据库dialect for mybatis
*/
String
dialect
;
public
DataSoruceConfig
()
{
super
();
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/**
* 取得数据库密码
* 如果是加密密码(encrypt==true),则进行解密
* @return decodePassword
*/
public
String
getPassword
()
{
String
decodePassword
=
""
;
LogFactory
.
getLog
(
DataSoruceConfig
.
class
).
debug
(
"password is "
+
password
);
if
(
encrypt
){
decodePassword
=
PasswordReciprocal
.
getInstance
().
decoder
(
password
);
}
else
{
decodePassword
=
password
;
}
LogFactory
.
getLog
(
DataSoruceConfig
.
class
).
debug
(
"password is "
+
password
+
" , decodePassword is "
+
decodePassword
);
return
decodePassword
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
/**
* @return the database
*/
public
String
getDatabase
()
{
return
database
;
}
/**
* @param database the database to set
*/
public
void
setDatabase
(
String
database
)
{
this
.
database
=
database
;
}
/**
* @return the driverClass
*/
public
String
getDriverClass
()
{
return
driverClass
;
}
/**
* @param driverClass the driverClass to set
*/
public
void
setDriverClass
(
String
driverClass
)
{
this
.
driverClass
=
driverClass
;
}
public
boolean
isEncrypt
()
{
return
encrypt
;
}
public
void
setEncrypt
(
boolean
encrypt
)
{
this
.
encrypt
=
encrypt
;
}
/**
* @return the dialect
*/
public
String
getDialect
()
{
if
(
this
.
dialect
==
null
)
{
this
.
dialect
=
Dialect
.
getDialectMap
().
get
(
database
);
}
return
dialect
;
}
/**
* @param dialect the dialect to set
*/
public
void
setDialect
(
String
dialect
)
{
this
.
dialect
=
dialect
;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public
String
toString
()
{
return
"DataSoruceConfig [database="
+
database
+
", driverClass="
+
driverClass
+
", url="
+
url
+
", username="
+
username
+
", password="
+
password
+
", encrypt="
+
encrypt
+
"]"
;
}
/*
* 数据库类型
*/
@Value
(
"${config.datasource.database:mysql}"
)
String
database
;
/*
* jdbc驱动类
*/
@Value
(
"${config.datasource.driverclass:com.mysql.jdbc.Driver}"
)
String
driverClass
;
/*
* jdbc连接地址
*/
@Value
(
"${config.datasource.url:"
+
"jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8}"
)
String
url
;
/*
* 数据库用户名
*/
@Value
(
"${config.datasource.username:root}"
)
String
username
;
/*
* 数据库密码
*/
@Value
(
"${config.datasource.password:maxkey}"
)
String
password
;
/*
* 数据库密码是否加密
*/
@Value
(
"${config.datasource.password.encrypt}"
)
boolean
encrypt
=
false
;
/*
* 数据库dialect for mybatis
*/
String
dialect
;
public
DataSoruceConfig
()
{
super
();
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/**
* 取得数据库密码 如果是加密密码(encrypt==true),则进行解密.
*
* @return decodePassword
*/
public
String
getPassword
()
{
String
decodePassword
=
""
;
LogFactory
.
getLog
(
DataSoruceConfig
.
class
).
debug
(
"password is "
+
password
);
if
(
encrypt
)
{
decodePassword
=
PasswordReciprocal
.
getInstance
().
decoder
(
password
);
}
else
{
decodePassword
=
password
;
}
LogFactory
.
getLog
(
DataSoruceConfig
.
class
)
.
debug
(
"password is "
+
password
+
" , decodePassword is "
+
decodePassword
);
return
decodePassword
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
/*
*
* @return the database
*/
public
String
getDatabase
()
{
return
database
;
}
/*
* @param database the database to set
*/
public
void
setDatabase
(
String
database
)
{
this
.
database
=
database
;
}
/*
* @return the driverClass
*/
public
String
getDriverClass
()
{
return
driverClass
;
}
/*
* @param driverClass the driverClass to set
*/
public
void
setDriverClass
(
String
driverClass
)
{
this
.
driverClass
=
driverClass
;
}
public
boolean
isEncrypt
()
{
return
encrypt
;
}
public
void
setEncrypt
(
boolean
encrypt
)
{
this
.
encrypt
=
encrypt
;
}
/**
* getDialect.
* @return the dialect
*/
public
String
getDialect
()
{
if
(
this
.
dialect
==
null
)
{
this
.
dialect
=
Dialect
.
getDialectMap
().
get
(
database
);
}
return
dialect
;
}
/*
* @param dialect the dialect to set
*/
public
void
setDialect
(
String
dialect
)
{
this
.
dialect
=
dialect
;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public
String
toString
()
{
return
"DataSoruceConfig [database="
+
database
+
", driverClass="
+
driverClass
+
", url="
+
url
+
", username="
+
username
+
", password="
+
password
+
", encrypt="
+
encrypt
+
"]"
;
}
}
maxkey-core/src/main/java/org/maxkey/config/EmailConfig.java
浏览文件 @
d254e8a2
...
...
@@ -8,109 +8,105 @@ import org.springframework.context.annotation.PropertySource;
@PropertySource
(
"classpath:/config/applicationConfig.properties"
)
public
class
EmailConfig
{
@Value
(
"${config.email.username}"
)
private
String
username
;
@Value
(
"${config.email.password}"
)
private
String
password
;
@Value
(
"${config.email.smtpHost}"
)
private
String
smtpHost
;
@Value
(
"${config.email.senderMail}"
)
private
String
senderMail
;
@Value
(
"${config.email.port}"
)
private
Integer
port
;
@Value
(
"${config.email.ssl}"
)
private
boolean
ssl
;
public
EmailConfig
()
{
// TODO Auto-generated constructor stub
}
/**
* @return the username
*/
public
String
getUsername
()
{
return
username
;
}
/**
* @param username the username to set
*/
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/**
* @return the password
*/
public
String
getPassword
()
{
return
password
;
}
/**
* @param password the password to set
*/
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
/**
* @return the smtpHost
*/
public
String
getSmtpHost
()
{
return
smtpHost
;
}
/**
* @param smtpHost the smtpHost to set
*/
public
void
setSmtpHost
(
String
smtpHost
)
{
this
.
smtpHost
=
smtpHost
;
}
/**
* @return the senderMail
*/
public
String
getSenderMail
()
{
return
senderMail
;
}
/**
* @param senderMail the senderMail to set
*/
public
void
setSenderMail
(
String
senderMail
)
{
this
.
senderMail
=
senderMail
;
}
/**
* @return the port
*/
public
Integer
getPort
()
{
return
port
;
}
/**
* @param port the port to set
*/
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
}
/**
* @return the ssl
*/
public
boolean
isSsl
()
{
return
ssl
;
}
/**
* @param ssl the ssl to set
*/
public
void
setSsl
(
boolean
ssl
)
{
this
.
ssl
=
ssl
;
}
@Value
(
"${config.email.username}"
)
private
String
username
;
@Value
(
"${config.email.password}"
)
private
String
password
;
@Value
(
"${config.email.smtpHost}"
)
private
String
smtpHost
;
@Value
(
"${config.email.senderMail}"
)
private
String
senderMail
;
@Value
(
"${config.email.port}"
)
private
Integer
port
;
@Value
(
"${config.email.ssl}"
)
private
boolean
ssl
;
public
EmailConfig
()
{
// TODO Auto-generated constructor stub
}
/*
* @return the username
*/
public
String
getUsername
()
{
return
username
;
}
/*
* @param username the username to set
*/
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/*
* @return the password
*/
public
String
getPassword
()
{
return
password
;
}
/*
* @param password the password to set
*/
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
/*
* @return the smtpHost
*/
public
String
getSmtpHost
()
{
return
smtpHost
;
}
/*
* @param smtpHost the smtpHost to set
*/
public
void
setSmtpHost
(
String
smtpHost
)
{
this
.
smtpHost
=
smtpHost
;
}
/*
* @return the senderMail
*/
public
String
getSenderMail
()
{
return
senderMail
;
}
/*
* @param senderMail the senderMail to set
*/
public
void
setSenderMail
(
String
senderMail
)
{
this
.
senderMail
=
senderMail
;
}
/*
* @return the port
*/
public
Integer
getPort
()
{
return
port
;
}
/*
* @param port the port to set
*/
public
void
setPort
(
Integer
port
)
{
this
.
port
=
port
;
}
/*
* @return the ssl
*/
public
boolean
isSsl
()
{
return
ssl
;
}
/*
* @param ssl the ssl to set
*/
public
void
setSsl
(
boolean
ssl
)
{
this
.
ssl
=
ssl
;
}
}
maxkey-core/src/main/java/org/maxkey/config/LoginConfig.java
浏览文件 @
d254e8a2
...
...
@@ -87,8 +87,16 @@ public class LoginConfig {
@Override
public
String
toString
()
{
return
"LoginConfig [captcha="
+
captcha
+
", oneTimePwd="
+
oneTimePwd
+
", socialSignOn="
+
socialSignOn
+
", kerberos="
+
kerberos
+
", remeberMe="
+
remeberMe
+
", wsFederation="
+
wsFederation
+
", defaultUri="
+
defaultUri
+
"]"
;
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"LoginConfig [captcha="
).
append
(
captcha
)
.
append
(
", oneTimePwd="
).
append
(
oneTimePwd
)
.
append
(
", socialSignOn="
).
append
(
socialSignOn
)
.
append
(
", kerberos="
).
append
(
kerberos
)
.
append
(
", remeberMe="
).
append
(
remeberMe
)
.
append
(
", wsFederation="
).
append
(
wsFederation
)
.
append
(
", defaultUri="
).
append
(
defaultUri
).
append
(
"]"
);
return
builder
.
toString
();
}
}
maxkey-core/src/main/java/org/maxkey/config/oidc/OIDCProviderMetadataDetails.java
浏览文件 @
d254e8a2
/**
*
*/
package
org.maxkey.config.oidc
;
import
java.net.URI
;
import
java.util.Set
;
/**
* @author Hiro
* OIDCProviderMetadataDetails.
* @author cm
*
*/
public
class
OIDCProviderMetadataDetails
implements
OIDCProviderMetadata
{
protected
String
issuer
;
protected
String
issuer
;
protected
URI
authorizationEndpoint
;
protected
URI
authorizationEndpoint
;
protected
URI
tokenEndpoint
;
protected
URI
tokenEndpoint
;
protected
URI
userinfoEndpoint
;
protected
URI
userinfoEndpoint
;
protected
URI
jwksUri
;
protected
URI
jwksUri
;
protected
URI
registrationEndpoint
;
protected
URI
registrationEndpoint
;
protected
Set
<
String
>
scopesSupported
;
protected
Set
<
String
>
scopesSupported
;
protected
Set
<
String
>
responseTypesSupported
;
protected
Set
<
String
>
responseTypesSupported
;
public
String
getIssuer
()
{
return
issuer
;
}
public
String
getIssuer
()
{
return
issuer
;
}
public
void
setIssuer
(
String
issuer
)
{
this
.
issuer
=
issuer
;
}
public
void
setIssuer
(
String
issuer
)
{
this
.
issuer
=
issuer
;
}
public
URI
getAuthorizationEndpoint
()
{
return
authorizationEndpoint
;
}
public
URI
getAuthorizationEndpoint
()
{
return
authorizationEndpoint
;
}
public
void
setAuthorizationEndpoint
(
URI
authorizationEndpoint
)
{
this
.
authorizationEndpoint
=
authorizationEndpoint
;
}
public
void
setAuthorizationEndpoint
(
URI
authorizationEndpoint
)
{
this
.
authorizationEndpoint
=
authorizationEndpoint
;
}
public
URI
getTokenEndpoint
()
{
return
tokenEndpoint
;
}
public
URI
getTokenEndpoint
()
{
return
tokenEndpoint
;
}
public
void
setTokenEndpoint
(
URI
tokenEndpoint
)
{
this
.
tokenEndpoint
=
tokenEndpoint
;
}
public
void
setTokenEndpoint
(
URI
tokenEndpoint
)
{
this
.
tokenEndpoint
=
tokenEndpoint
;
}
public
URI
getUserinfoEndpoint
()
{
return
userinfoEndpoint
;
}
public
URI
getUserinfoEndpoint
()
{
return
userinfoEndpoint
;
}
public
void
setUserinfoEndpoint
(
URI
userinfoEndpoint
)
{
this
.
userinfoEndpoint
=
userinfoEndpoint
;
}
public
void
setUserinfoEndpoint
(
URI
userinfoEndpoint
)
{
this
.
userinfoEndpoint
=
userinfoEndpoint
;
}
public
URI
getJwksUri
()
{
return
jwksUri
;
}
public
URI
getJwksUri
()
{
return
jwksUri
;
}
public
void
setJwksUri
(
URI
jwksUri
)
{
this
.
jwksUri
=
jwksUri
;
}
public
void
setJwksUri
(
URI
jwksUri
)
{
this
.
jwksUri
=
jwksUri
;
}
public
URI
getRegistrationEndpoint
()
{
return
registrationEndpoint
;
}
public
URI
getRegistrationEndpoint
()
{
return
registrationEndpoint
;
}
public
void
setRegistrationEndpoint
(
URI
registrationEndpoint
)
{
this
.
registrationEndpoint
=
registrationEndpoint
;
}
public
void
setRegistrationEndpoint
(
URI
registrationEndpoint
)
{
this
.
registrationEndpoint
=
registrationEndpoint
;
}
public
Set
<
String
>
getScopesSupported
()
{
return
scopesSupported
;
}
public
Set
<
String
>
getScopesSupported
()
{
return
scopesSupported
;
}
public
void
setScopesSupported
(
Set
<
String
>
scopesSupported
)
{
this
.
scopesSupported
=
scopesSupported
;
}
public
void
setScopesSupported
(
Set
<
String
>
scopesSupported
)
{
this
.
scopesSupported
=
scopesSupported
;
}
public
Set
<
String
>
getResponseTypesSupported
()
{
return
responseTypesSupported
;
}
public
Set
<
String
>
getResponseTypesSupported
()
{
return
responseTypesSupported
;
}
public
void
setResponseTypesSupported
(
Set
<
String
>
responseTypesSupported
)
{
this
.
responseTypesSupported
=
responseTypesSupported
;
}
public
void
setResponseTypesSupported
(
Set
<
String
>
responseTypesSupported
)
{
this
.
responseTypesSupported
=
responseTypesSupported
;
}
// TODO: Complete remaining properties from
// http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
// TODO: Complete remaining properties from
// http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
}
maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java
浏览文件 @
d254e8a2
/**
*
*/
package
org.maxkey.web
;
import
java.sql.Connection
;
...
...
@@ -11,11 +8,9 @@ import java.util.Properties;
import
java.util.Set
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
javax.servlet.ServletConfig
;
import
javax.servlet.ServletException
;
import
javax.servlet.http.HttpServlet
;
import
org.maxkey.cache.CacheFactory
;
import
org.maxkey.util.PathUtils
;
import
org.slf4j.Logger
;
...
...
@@ -27,6 +22,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import
org.springframework.web.context.support.WebApplicationContextUtils
;
/**
* InitApplicationContext .
* @author Crystal.Sea
*
*/
...
...
@@ -71,6 +67,9 @@ public class InitApplicationContext extends HttpServlet {
this
.
applicationContext
=
applicationContext
;
}
/**
* loadCaches.
*/
public
void
loadCaches
()
{
_logger
.
info
(
"----------------------------------------------------------------------------------------------------"
);
...
...
@@ -89,6 +88,9 @@ public class InitApplicationContext extends HttpServlet {
}
/**
* listDataBaseVariables.
*/
public
void
listDataBaseVariables
()
{
if
(
applicationContext
.
containsBean
(
"dataSource"
))
{
try
{
...
...
@@ -122,7 +124,9 @@ public class InitApplicationContext extends HttpServlet {
}
}
// propertySourcesPlaceholderConfigurer
/**
* propertySourcesPlaceholderConfigurer.
*/
public
void
listProperties
()
{
if
(
applicationContext
.
containsBean
(
"propertySourcesPlaceholderConfigurer"
))
{
_logger
.
debug
(
...
...
@@ -149,6 +153,9 @@ public class InitApplicationContext extends HttpServlet {
}
}
/**
* listEnvVars.
*/
public
void
listEnvVars
()
{
_logger
.
debug
(
"----------------------------------------------------------------------------------------------------"
);
...
...
@@ -169,6 +176,9 @@ public class InitApplicationContext extends HttpServlet {
"----------------------------------------------------------------------------------------------------"
);
}
/**
* showLicense.
*/
public
void
showLicense
()
{
_logger
.
info
(
"----------------------------------------------------------------------------------------------------"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录