Commit e765cec1 authored by guwd's avatar guwd
Browse files

内部测试

parent 2bcb8672
File added
...@@ -38,6 +38,36 @@ ...@@ -38,6 +38,36 @@
<groupId>net.mingsoft</groupId> <groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId> <artifactId>ms-mpeople</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/ojdbc6.jar</systemPath>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
</dependencies> </dependencies>
......
...@@ -24,6 +24,7 @@ import org.mybatis.spring.annotation.MapperScan; ...@@ -24,6 +24,7 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
...@@ -35,6 +36,7 @@ import java.util.Locale; ...@@ -35,6 +36,7 @@ import java.util.Locale;
@ComponentScan(basePackages = {"net.mingsoft"}) @ComponentScan(basePackages = {"net.mingsoft"})
@MapperScan(basePackages={"**.dao","com.baomidou.**.mapper"}) @MapperScan(basePackages={"**.dao","com.baomidou.**.mapper"})
@ServletComponentScan(basePackages = {"net.mingsoft"}) @ServletComponentScan(basePackages = {"net.mingsoft"})
@EnableCaching
public class MSApplication { public class MSApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(MSApplication.class, args); SpringApplication.run(MSApplication.class, args);
......
package net.mingsoft.cms.biz;
public interface ICacheBiz {
void set(String cacheName, String key, Object value);
<T> T get(String cacheName, String key, Class<T> cls);
void del(String cacheName, String key);
}
\ No newline at end of file
package net.mingsoft.cms.biz.impl;
import com.alibaba.fastjson.JSONObject;
import net.mingsoft.cms.biz.ICacheBiz;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Service;
@Service("abc")
public class EhcacheBizImpl implements ICacheBiz {
@Autowired
private CacheManager cacheManager;
@Override
public void set(String cacheName, String key, Object value) {
this.cacheManager.getCache(cacheName).put(key, JSONObject.toJSONString(value));
}
@Override
public <T> T get(String cacheName, String key, Class<T> cls) {
String str = this.cacheManager.getCache(cacheName).get(key, String.class);
if (StringUtils.isBlank(str)) {
return null;
}
return JSONObject.parseObject(str, cls);
}
@Override
public void del(String cacheName, String key) {
this.cacheManager.getCache(cacheName).evictIfPresent(key);
}
}
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
*/ */
package net.mingsoft.cms.dao; package net.mingsoft.cms.dao;
import com.baomidou.mybatisplus.annotation.SqlParser;
import net.mingsoft.base.dao.IBaseDao; import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.CategoryEntity;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
FROM java
VOLUME /tmp
ADD docker-springboot-0.0.1-SNAPSHOT.jar mcms.jar
RUN bash -c 'touch /app.jar' ENV JAVA_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
\ No newline at end of file
#spring:
# datasource:
# url: jdbc:mysql://localhost:3306/mcms-5.2?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
# username: root
# password: root
# filters: wall,mergeStat
# type: com.alibaba.druid.pool.DruidDataSource
spring: spring:
datasource: datasource:
url: jdbc:mysql://192.168.0.8:3316/mcms-5.2?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@192.168.0.7:1521:helowin
username: mcms username: mcms
password: mcms password: mcms
filters: wall,mergeStat filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
...@@ -50,6 +50,9 @@ spring: ...@@ -50,6 +50,9 @@ spring:
enabled: true #启用druid监控 enabled: true #启用druid监控
profiles: profiles:
active: dev active: dev
cache:
ehcache:
config: classpath:ehcache.xml
mvc: mvc:
pathmatch: pathmatch:
use-suffix-pattern: true use-suffix-pattern: true
...@@ -89,6 +92,7 @@ spring: ...@@ -89,6 +92,7 @@ spring:
mybatis-plus: mybatis-plus:
global-config: global-config:
db-config: db-config:
column-format: "\"%s\""
id-type: assign_id id-type: assign_id
configuration: configuration:
database-id: mysql database-id: oracle
\ No newline at end of file \ No newline at end of file
...@@ -30,6 +30,18 @@ ...@@ -30,6 +30,18 @@
transactionalMode="off"> transactionalMode="off">
</cache> </cache>
<cache name="USER"
overflowToDisk="true"
maxElementsInMemory="10000"
maxElementsOnDisk="10000000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
</cache>
</ehcache> </ehcache>
<!-- <!--
......
<html>
<head>
<meta charset="utf-8" />
<title>{ms:global.name/}</title>
<meta http-equiv="content-type" content="text/html" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width"/>
<meta name="format-detection" content="telephone=no"/>
<meta name="app-mobile-web-app-capable" content="yes"/>
<meta name="app-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="keywords" content="{ms:global.keyword/}" />
<meta name="description" content="{ms:global.descrip/}" />
<script type="text/javascript" src="{ms:global.host/}/static/plugins/vue/2.6.9/vue.min.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/minireset/0.0.2/minireset.min.css" />
<link rel="stylesheet" href="https://cdn.mingsoft.net/iconfont/iconfont.css" />
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/animate/4.1.0/animate.min.css">
<script src="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.js"></script>
<link rel="stylesheet" href="{ms:global.host/}/static/plugins/element-ui/2.12.0/index.css" />
<link rel="stylesheet" href="{ms:global.host/}/{ms:global.style/}/css/app.css" />
<!--网络请求框架-->
<script src="{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"></script>
<script src="{ms:global.host/}/static/plugins/qs/6.6.0/qs.min.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"></script>
<script>
ms.base = "";
</script>
<style>
[v-cloak]{
display: none;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<#include "header.htm"/>
<#include "search-bar.htm"/>
<div class="content">
<div class="detail">
<div class="top">
<span class="title" >
${field.title}
</span>
<div class="date">
<span >
发布时间:
</span>
<span >
${field.date?string("yyyy-MM-dd")}
</span>
<span >
浏览次数:
</span>
<span >
${field.hit}
</span>
</div> </div>
<div class="body">
<span class="body-text" >
${field.content}
</span>
</div> </div> <!--返回顶部-start-->
<!--返回顶部 - start -->
<div class="ms-right-fixed-top" onclick="document.getElementById(..).scrollTop = 0;">
<!--内容区域 - start -->
<div class="content">
<i class="iconfont icon-shang"></i>
<span>
回到顶部
</span>
</div>
<!--内容区域 -end -->
</div>
<!--返回顶部 -end --> <!--返回顶部-end-->
</div>
<#include "footer.htm"/>
</div>
</body>
</html>
<script>
var app = new Vue({
el: '#app',
watch:{
},
data: {
},
methods: {
switchShow:function(arr){
var that = this
arr.forEach(function(x){
let e = that.$el.querySelector("#key_"+x)
if(e){
e.style.display=e.style.display=='none'?'flex':'none'
}
})
},
},
created(){
}
})
</script>
<style>
body {
background-color:#f5f5f5;
box-sizing:border-box;
font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Segoe UI", "Helvetica Neue", "PingFang SC", "Noto Sans", "Noto Sans CJK SC", "Microsoft YaHei", 微软雅黑, sans-serif;
moz-box-sizing:border-box;
webkit-box-sizing:border-box;
}
.content
{
flex-wrap:nowrap;
flex-direction:column;
display:flex;
padding-right:0px;
width:100%;
margin-bottom:0px;
box-sizing:border-box;
padding-left:0px;
margin-top:0px;
height:unset;
}
.content .detail
{
background-color:#FFFFFF;
align-items:center;
flex-direction:column;
display:flex;
padding-right:0px;
box-sizing:border-box;
margin-left:auto;
min-height:800px;
margin-right:auto;
padding-bottom:0px;
flex-wrap:nowrap;
width:1170px;
margin-bottom:10px;
padding-top:0px;
position:relative;
padding-left:0px;
margin-top:10px;
height:300px;
}
.content .detail .top
{
align-items:center;
flex-direction:column;
display:flex;
padding-right:0px;
box-sizing:border-box;
justify-content:center;
border-bottom-color:#EBEEF5;
padding-bottom:32px;
flex-wrap:nowrap;
width:90%;
margin-bottom:0px;
border-bottom-style:solid;
padding-top:32px;
border-bottom-width:1px;
padding-left:0px;
margin-top:0px;
}
.content .detail .top .title
{
padding-bottom:0px;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
font-size:28PX;
padding-top:0px;
}
.content .detail .top .date
{
align-items:center;
flex-direction:row;
display:flex;
box-sizing:border-box;
justify-content:center;
margin-left:0px;
margin-right:0px;
flex-wrap:nowrap;
width:100%;
margin-bottom:0px;
padding-top:0px;
margin-top:0px;
height:100%;
}
.content .detail .top .date span
{
font-size:16PX;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
}
.content .detail .body
{
align-items:center;
flex-wrap:nowrap;
flex-direction:column;
display:flex;
width:90%;
margin-bottom:0px;
box-sizing:border-box;
padding-top:32px;
justify-content:center;
margin-top:0px;
}
.content .detail .body .body-text
{
margin-right:auto;
padding-bottom:0px;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
font-size:18PX;
line-height:32px;
margin-bottom:0px;
padding-top:0px;
margin-top:0px;
margin-left:0px;
}
.content .ms-right-fixed-top
{
margin:0 auto;
align-items:center;
flex-direction:row;
display:flex;
padding-right:0px;
box-sizing:border-box;
justify-content:center;
margin-left:0px;
padding-bottom:0px;
flex-wrap:nowrap;
width:1200px;
margin-bottom:0px;
position:relative;
padding-top:0px;
padding-left:0px;
margin-top:0px;
height:0px;
}
.content .ms-right-fixed-top >.content
{
align-items:center;
flex-direction:column;
display:flex;
padding-right:0px;
box-sizing:border-box;
margin-left:600px;
padding-bottom:0px;
top:400px;
flex-wrap:nowrap;
left:50%;
width:40px;
position:fixed;
padding-top:0px;
padding-left:0px;
z-index:1;
}
.content .ms-right-fixed-top >.content i
{
padding-bottom:0px;
padding-top:0px;
padding-left:0px;
padding-right:0px;
margin-left:0px;
}
.content .ms-right-fixed-top >.content span
{
background-color:#909399;
color:#FFFFFF;
text-align:center;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
padding-right:5px;
margin-left:0px;
padding-bottom:5px;
width:50px;
font-size:14px;
padding-top:5px;
padding-left:5px;
height:40%;
}
@media (max-width: 768px){
.content .detail
{
background-color:#FFFFFF;
align-items:center;
flex-direction:column;
display:flex;
box-sizing:border-box;
margin-left:auto;
min-height:800px;
margin-right:auto;
padding-bottom:0px;
flex-wrap:nowrap;
width:100%;
margin-bottom:10px;
padding-top:0px;
position:relative;
padding-left:0px;
margin-top:10px;
height:300px;
}
.content .detail .top
{
align-items:center;
flex-direction:column;
display:flex;
box-sizing:border-box;
justify-content:center;
border-bottom-color:#EBEEF5;
padding-bottom:32px;
flex-wrap:nowrap;
width:90%;
margin-bottom:0px;
border-bottom-style:solid;
padding-top:32px;
border-bottom-width:1px;
margin-top:0px;
}
.content .detail .top .title
{
margin-right:0px;
padding-bottom:0px;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
font-size:28PX;
padding-top:0px;
}
.content .detail .top .date
{
align-items:center;
flex-direction:row;
display:flex;
box-sizing:border-box;
justify-content:center;
margin-left:0px;
margin-right:0px;
flex-wrap:nowrap;
width:100%;
margin-bottom:0px;
padding-top:0px;
margin-top:0px;
height:100%;
}
.content .detail .top .date span
{
font-size:16PX;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
}
.content .detail .body
{
align-items:center;
flex-wrap:nowrap;
flex-direction:column;
display:flex;
width:90%;
margin-bottom:0px;
box-sizing:border-box;
padding-top:32px;
justify-content:center;
margin-top:0px;
}
.content .detail .body .body-text
{
margin-right:auto;
padding-bottom:0px;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
font-size:18PX;
line-height:32px;
margin-bottom:0px;
padding-top:0px;
margin-top:0px;
margin-left:0px;
}
.content .ms-right-fixed-top
{
margin:0 auto;
align-items:center;
flex-direction:row;
display:flex;
box-sizing:border-box;
justify-content:center;
margin-left:0px;
flex-wrap:nowrap;
width:100%;
margin-bottom:0px;
position:relative;
margin-top:0px;
height:0px;
}
.content .ms-right-fixed-top >.content
{
align-items:center;
flex-direction:column;
display:flex;
padding-right:0px;
box-sizing:border-box;
margin-left:600px;
padding-bottom:0px;
top:400px;
flex-wrap:nowrap;
left:50%;
width:40px;
position:fixed;
padding-top:0px;
padding-left:0px;
z-index:1;
}
.content .ms-right-fixed-top >.content i
{
margin-left:0px;
}
.content .ms-right-fixed-top >.content span
{
background-color:#909399;
color:#FFFFFF;
text-align:center;
flex-direction:row;
word-wrap:break-word;
display:inline-block;
padding-right:5px;
margin-left:0px;
padding-bottom:5px;
width:50px;
font-size:14px;
padding-top:5px;
padding-left:5px;
height:40%;
}
}</style>
\ No newline at end of file
This diff is collapsed.
<!--底部导航-start-->
<div class="footer">
<!--友情链接-start-->
<div class="links">
<div class="body">
<span >
网站导航
</span>
<div class="link">
<!--下拉框-start-->
<select class="ms-select">
{ms:arclist typeid=163 size=10 }
<option value="">[field.title/]</option>
{/ms:arclist}
</select> <!--下拉框-end-->
</div>
<div class="link">
<!--下拉框-start-->
<select class="ms-select">
{ms:arclist typeid=163 size=10 }
<option value="">[field.title/]</option>
{/ms:arclist}
</select> <!--下拉框-end-->
</div>
<div class="link">
<!--下拉框-start-->
<select class="ms-select">
{ms:arclist typeid=163 size=10 }
<option value="">[field.title/]</option>
{/ms:arclist}
</select> <!--下拉框-end-->
</div>
<div class="link">
<!--下拉框-start-->
<select class="ms-select">
{ms:arclist typeid=163 size=5 }
<option value="">[field.title/]</option>
{/ms:arclist}
</select> <!--下拉框-end-->
</div>
<div class="link">
<!--下拉框-start-->
<select class="ms-select">
{ms:arclist typeid=163 size=5 }
<option value="">[field.title/]</option>
{/ms:arclist}
</select> <!--下拉框-end-->
</div> </div> </div> <!--友情链接-end-->
<!--版权信息-start-->
<div class="copyright">
<div class="body">
<img
title=""
alt=""
src="{ms:global.host/}/{ms:global.style/}/images/1602123532415.png"
/>
<div class="desc">
<div class="text">
<div >
<a href="#"
>
关于我们
</a>
<span >
</span>
<a href="#"
>
网站地图
</a>
</div> </div>
<div class="text">
<a href="#"
>
主办:江西省人民政府办公厅
</a>
<a href="#"
>
承办:江西省信息中心
</a>
</div>
<div class="text">
<a href="#"
>
赣ICP备05004294号
</a>
<a href="#"
>
政府网站标识码3600000012
</a>
<a href="#"
>
赣公网安备 36010802000128号
</a>
</div>
<div class="ms-designer">
<a href="www.mingsoft.net"
target="_blank"
>
@该网页由MDesigner制作完成
</a>
</div> </div>
<div class="right">
<div class="img">
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1234.png"
/>
<span >
国务院客户端
</span>
</div>
<div class="img">
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_724.png"
/>
<span >
国务院小程序
</span>
</div>
<div class="wx">
<div >
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1434.png"
/>
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1534.png"
/>
<span >
中国政府网微博、微信
</span>
</div> </div> </div> </div> </div> <!--版权信息-end-->
<!--左漂浮-start-->
<div class="left-fixed">
<div class="content">
<img
title=""
alt=""
src="https://iph.href.lu/100x100"
/>
</div> </div> <!--左漂浮-end-->
<!--右漂浮-start-->
<div class="right-fixed">
<div class="content">
<img
title=""
alt=""
src="https://iph.href.lu/100x100"
/>
</div> </div> <!--右漂浮-end-->
</div> <!--底部导航-end-->
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