Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
09ee994b
Commit
09ee994b
authored
Nov 14, 2022
by
mingsoft
Browse files
up::5.2.10
Signed-off-by:
mingsoft
<
killfen@126.com
>
parent
c86c7b92
Changes
23
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
View file @
09ee994b
/**
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package
net.mingsoft.cms.entity
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
net.mingsoft.base.entity.BaseEntity
;
import
java.util.Date
;
/**
* 文章浏览记录实体
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public
class
HistoryLogEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1577064243576L
;
/**
* 文章编号
*/
private
String
contentId
;
/**
* 浏览ip
*/
private
String
hlIp
;
/**
* 用户idp
*/
private
String
peopleId
;
/**
* 是否为移动端
*/
private
Boolean
hlIsMobile
;
/**
* 设置文章编号
*/
public
void
setContentId
(
String
contentId
)
{
this
.
contentId
=
contentId
;
}
/**
* 获取文章编号
*/
public
String
getContentId
()
{
return
this
.
contentId
;
}
/**
* 设置浏览ip
*/
public
void
setHlIp
(
String
hlIp
)
{
this
.
hlIp
=
hlIp
;
}
/**
* 获取浏览ip
*/
public
String
getHlIp
()
{
return
this
.
hlIp
;
}
public
String
getPeopleId
()
{
return
peopleId
;
}
public
void
setPeopleId
(
String
peopleId
)
{
this
.
peopleId
=
peopleId
;
}
/**
* 设置是否为移动端
*/
public
void
setHlIsMobile
(
Boolean
hlIsMobile
)
{
this
.
hlIsMobile
=
hlIsMobile
;
}
/**
* 获取是否为移动端
*/
public
Boolean
getHlIsMobile
()
{
return
this
.
hlIsMobile
;
}
}
/**
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package
net.mingsoft.cms.entity
;
import
net.mingsoft.base.entity.BaseEntity
;
/**
* 文章浏览记录实体
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public
class
HistoryLogEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1577064243576L
;
/**
* 文章编号
*/
private
String
contentId
;
/**
* 浏览ip
*/
private
String
hlIp
;
/**
* 用户idp
*/
private
String
peopleId
;
/**
* 是否为移动端
*/
private
Boolean
hlIsMobile
;
/**
* 设置文章编号
*/
public
void
setContentId
(
String
contentId
)
{
this
.
contentId
=
contentId
;
}
/**
* 获取文章编号
*/
public
String
getContentId
()
{
return
this
.
contentId
;
}
/**
* 设置浏览ip
*/
public
void
setHlIp
(
String
hlIp
)
{
this
.
hlIp
=
hlIp
;
}
/**
* 获取浏览ip
*/
public
String
getHlIp
()
{
return
this
.
hlIp
;
}
public
String
getPeopleId
()
{
return
peopleId
;
}
public
void
setPeopleId
(
String
peopleId
)
{
this
.
peopleId
=
peopleId
;
}
/**
* 设置是否为移动端
*/
public
void
setHlIsMobile
(
Boolean
hlIsMobile
)
{
this
.
hlIsMobile
=
hlIsMobile
;
}
/**
* 获取是否为移动端
*/
public
Boolean
getHlIsMobile
()
{
return
this
.
hlIsMobile
;
}
}
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
09ee994b
...
...
@@ -22,7 +22,6 @@
package
net.mingsoft.cms.util
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.PageUtil
;
...
...
src/main/java/net/mingsoft/config/WebConfig.java
View file @
09ee994b
...
...
@@ -40,7 +40,10 @@ import org.springframework.core.Ordered;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
;
import
org.springframework.web.context.request.RequestContextListener
;
import
org.springframework.web.servlet.config.annotation.*
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.ViewControllerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
javax.annotation.Resource
;
import
java.io.File
;
...
...
@@ -95,7 +98,7 @@ public class WebConfig implements WebMvcConfigurer {
String
uploadMapping
=
MSProperties
.
upload
.
mapping
;
String
uploadFolderPath
=
MSProperties
.
upload
.
path
;
String
template
=
MSProperties
.
upload
.
template
;
String
htmlDir
=
MSProperties
.
D
iy
Properties
.
htmlDir
;
String
htmlDir
=
MSProperties
.
d
iy
.
htmlDir
;
// 上传路径映射 这里的映射不能使用File.separator Windows会存在映射问题
registry
.
addResourceHandler
(
uploadMapping
).
addResourceLocations
(
"/"
+
uploadFolderPath
+
"/"
,
"file:"
+
uploadFolderPath
+
"/"
);
registry
.
addResourceHandler
(
"/"
+
template
+
"/**"
).
addResourceLocations
(
"/"
+
template
+
"/"
,
"file:"
+
template
+
"/"
);
...
...
@@ -127,9 +130,9 @@ public class WebConfig implements WebMvcConfigurer {
//XSS过滤器
@Bean
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.enable:
fals
e}"
)
boolean
xssEnable
,
@Value
(
"${ms.xss.filter-url}
:''
"
)
String
filterUrl
,
@Value
(
"${ms.xss.exclude-url}
:''
"
)
String
excludeUrl
)
{
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.enable:
tru
e}"
)
boolean
xssEnable
,
@Value
(
"${ms.xss.filter-url}"
)
String
filterUrl
,
@Value
(
"${ms.xss.exclude-url}"
)
String
excludeUrl
)
{
XSSEscapeFilter
xssFilter
=
new
XSSEscapeFilter
();
Map
<
String
,
String
>
initParameters
=
new
HashMap
();
FilterRegistrationBean
registration
=
new
FilterRegistrationBean
();
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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