Commit 09ee994b authored by mingsoft's avatar mingsoft
Browse files

up::5.2.10


Signed-off-by: default avatarmingsoft <killfen@126.com>
parent c86c7b92
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * 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 * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * 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, * the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions: * subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all * The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. * copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * 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 * 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 * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.entity; package net.mingsoft.cms.entity;
import com.alibaba.fastjson.annotation.JSONField; import net.mingsoft.base.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat; /**
import com.fasterxml.jackson.annotation.JsonFormat; * 文章浏览记录实体
import net.mingsoft.base.entity.BaseEntity; * @author 铭飞开发团队
import java.util.Date; * 创建日期:2019-12-23 9:24:03<br/>
/** * 历史修订:<br/>
* 文章浏览记录实体 */
* @author 铭飞开发团队 public class HistoryLogEntity extends BaseEntity {
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/> private static final long serialVersionUID = 1577064243576L;
*/
public class HistoryLogEntity extends BaseEntity { /**
* 文章编号
private static final long serialVersionUID = 1577064243576L; */
private String contentId;
/** /**
* 文章编号 * 浏览ip
*/ */
private String contentId; private String hlIp;
/** /**
* 浏览ip * 用户idp
*/ */
private String hlIp; private String peopleId;
/** /**
* 用户idp * 是否为移动端
*/ */
private String peopleId; private Boolean hlIsMobile;
/**
* 是否为移动端
*/ /**
private Boolean hlIsMobile; * 设置文章编号
*/
public void setContentId(String contentId) {
/** this.contentId = contentId;
* 设置文章编号 }
*/
public void setContentId(String contentId) { /**
this.contentId = contentId; * 获取文章编号
} */
public String getContentId() {
/** return this.contentId;
* 获取文章编号 }
*/ /**
public String getContentId() { * 设置浏览ip
return this.contentId; */
} public void setHlIp(String hlIp) {
/** this.hlIp = hlIp;
* 设置浏览ip }
*/
public void setHlIp(String hlIp) { /**
this.hlIp = hlIp; * 获取浏览ip
} */
public String getHlIp() {
/** return this.hlIp;
* 获取浏览ip }
*/
public String getHlIp() { public String getPeopleId() {
return this.hlIp; return peopleId;
} }
public String getPeopleId() { public void setPeopleId(String peopleId) {
return peopleId; this.peopleId = peopleId;
} }
public void setPeopleId(String peopleId) { /**
this.peopleId = peopleId; * 设置是否为移动端
} */
public void setHlIsMobile(Boolean hlIsMobile) {
/** this.hlIsMobile = hlIsMobile;
* 设置是否为移动端 }
*/
public void setHlIsMobile(Boolean hlIsMobile) { /**
this.hlIsMobile = hlIsMobile; * 获取是否为移动端
} */
public Boolean getHlIsMobile() {
/** return this.hlIsMobile;
* 获取是否为移动端 }
*/ }
public Boolean getHlIsMobile() {
return this.hlIsMobile;
}
}
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
package net.mingsoft.cms.util; package net.mingsoft.cms.util;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.PageUtil; import cn.hutool.core.util.PageUtil;
......
...@@ -40,7 +40,10 @@ import org.springframework.core.Ordered; ...@@ -40,7 +40,10 @@ import org.springframework.core.Ordered;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.context.request.RequestContextListener; 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 javax.annotation.Resource;
import java.io.File; import java.io.File;
...@@ -95,7 +98,7 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -95,7 +98,7 @@ public class WebConfig implements WebMvcConfigurer {
String uploadMapping = MSProperties.upload.mapping; String uploadMapping = MSProperties.upload.mapping;
String uploadFolderPath = MSProperties.upload.path; String uploadFolderPath = MSProperties.upload.path;
String template = MSProperties.upload.template; String template = MSProperties.upload.template;
String htmlDir = MSProperties.DiyProperties.htmlDir; String htmlDir = MSProperties.diy.htmlDir;
// 上传路径映射 这里的映射不能使用File.separator Windows会存在映射问题 // 上传路径映射 这里的映射不能使用File.separator Windows会存在映射问题
registry.addResourceHandler(uploadMapping).addResourceLocations("/" + uploadFolderPath + "/", "file:" + uploadFolderPath + "/"); registry.addResourceHandler(uploadMapping).addResourceLocations("/" + uploadFolderPath + "/", "file:" + uploadFolderPath + "/");
registry.addResourceHandler("/" + template + "/**").addResourceLocations("/" + template + "/", "file:" + template + "/"); registry.addResourceHandler("/" + template + "/**").addResourceLocations("/" + template + "/", "file:" + template + "/");
...@@ -127,9 +130,9 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -127,9 +130,9 @@ public class WebConfig implements WebMvcConfigurer {
//XSS过滤器 //XSS过滤器
@Bean @Bean
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:false}") boolean xssEnable, public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable,
@Value("${ms.xss.filter-url}:''") String filterUrl, @Value("${ms.xss.filter-url}") String filterUrl,
@Value("${ms.xss.exclude-url}:''") String excludeUrl) { @Value("${ms.xss.exclude-url}") String excludeUrl) {
XSSEscapeFilter xssFilter = new XSSEscapeFilter(); XSSEscapeFilter xssFilter = new XSSEscapeFilter();
Map<String, String> initParameters = new HashMap(); Map<String, String> initParameters = new HashMap();
FilterRegistrationBean registration = new FilterRegistrationBean(); FilterRegistrationBean registration = new FilterRegistrationBean();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment