update
parent
bdba9b8584
commit
35fd951877
|
@ -10,13 +10,15 @@
|
|||
</parent>
|
||||
<groupId>com.songpeng</groupId>
|
||||
<artifactId>sparchetype</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0</version>
|
||||
<name>sparchetype</name>
|
||||
<description>maven 骨架生成所需项目</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<!-- docker 前缀名,通常用在上传镜像 -->
|
||||
<docker.image.prefix>sparchetype</docker.image.prefix>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -148,6 +150,13 @@
|
|||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.6</version>
|
||||
</dependency>
|
||||
|
||||
<!--logStash-->
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>5.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -156,6 +165,29 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<!-- Docker 插件 -->
|
||||
<plugin>
|
||||
<!-- 三坐标 -->
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<!-- 配置信息 -->
|
||||
<configuration>
|
||||
<!-- 镜像名称 -->
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
|
||||
<!-- Dockerfile 文件的位置 -->
|
||||
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||
<!-- 文件资源 -->
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
FROM openjdk:8-jdk-alpine
|
||||
VOLUME /tmp
|
||||
ADD sparchetype-1.0.0.jar app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo 'Asia/Shanghai' >/etc/timezone
|
||||
EXPOSE 9090
|
||||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
|
|
@ -9,13 +9,17 @@ import org.slf4j.LoggerFactory;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
/**
|
||||
* @author SongPeng
|
||||
*/
|
||||
public class RedisCacheManager implements CacheManager {
|
||||
|
||||
private static final Logger logger = LoggerFactory
|
||||
.getLogger(RedisCacheManager.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RedisCacheManager.class);
|
||||
|
||||
// fast lookup by name map
|
||||
private final ConcurrentMap<String, Cache> caches = new ConcurrentHashMap<String, Cache>();
|
||||
/**
|
||||
* fast lookup by name map
|
||||
*/
|
||||
private final ConcurrentMap<String, Cache> caches = new ConcurrentHashMap<>();
|
||||
|
||||
private RedisManager redisManager;
|
||||
|
||||
|
|
|
@ -18,10 +18,14 @@ public class RedisManager {
|
|||
@Value("${spring.redis.port}")
|
||||
private int port = 6379;
|
||||
|
||||
// 0 - never expire
|
||||
/**
|
||||
* 0 - never expire
|
||||
*/
|
||||
private int expire = 0;
|
||||
|
||||
//timeout for jedis try to connect to redis server, not expire time! In milliseconds
|
||||
/**
|
||||
* timeout for jedis try to connect to redis server, not expire time! In milliseconds
|
||||
*/
|
||||
@Value("${spring.redis.timeout}")
|
||||
private int timeout = 0;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ spring:
|
|||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/sparchetype?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong
|
||||
username: root
|
||||
password: 123456
|
||||
password: root
|
||||
druid:
|
||||
initial-size: 8
|
||||
min-idle: 5
|
||||
|
@ -51,3 +51,4 @@ logging:
|
|||
level:
|
||||
root: info
|
||||
com.songpeng: debug
|
||||
config: classpath:logback.xml
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration>
|
||||
<configuration>
|
||||
<!--应用名称-->
|
||||
<property name="LOG_NAME" value="/logs"/>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder charset="UTF-8">
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--输出到logstash的appender-->
|
||||
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<destination>192.168.137.95:5601</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
|
||||
</appender>
|
||||
|
||||
<appender name="async" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="stash" />
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="stash"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -7,7 +7,7 @@
|
|||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<#--<script src="${request.contextPath}/lib/jquery/jquery-3.4.1.min.js" charset="utf-8"></script>-->
|
||||
<script src="${request.contextPath}/lib/jquery/jquery-3.4.1.min.js" charset="utf-8"></script>
|
||||
<script src="${request.contextPath}/lib/layui/layui.js?v=v2.5.5" charset="utf-8"></script>
|
||||
<script src="${request.contextPath}/js/spUtil.js?v=1.0.0" charset="utf-8"></script>
|
||||
<script src="${request.contextPath}/js/layuimodule/config.js?v=1.0.0" charset="utf-8"></script>
|
|
@ -90,9 +90,9 @@
|
|||
</div>
|
||||
<script>
|
||||
layui.use(['element', 'layer', 'layuimini'], function () {
|
||||
var $ = layui.$,
|
||||
element = layui.element,
|
||||
layer = layui.layer;
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
layuimini = layui.layuimini;
|
||||
|
||||
layuimini.init('${request.contextPath}/json/init.json');
|
||||
});
|
||||
|
|
|
@ -61,9 +61,8 @@
|
|||
</div>
|
||||
<script src="${request.contextPath}/lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layui.use(['form', 'layer'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
// 登录过期的时候,跳出ifram框架
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<#include "${request.contextPath}/common/common.ftl">
|
||||
</head>
|
||||
|
||||
|
@ -73,14 +68,9 @@
|
|||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.extend({
|
||||
admin: '${request.contextPath}/js/admin'
|
||||
});
|
||||
layui.use(['form', 'jquery', 'util', 'admin', 'layer'], function() {
|
||||
layui.use(['form', 'util', 'layer'], function() {
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
util = layui.util,
|
||||
admin = layui.admin,
|
||||
layer = layui.layer;
|
||||
|
||||
//失去焦点时判断值为空不验证,一旦填写必须验证
|
||||
|
|
|
@ -60,15 +60,9 @@
|
|||
</a>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
layui.extend({
|
||||
admin: '${request.contextPath}/js/admin'
|
||||
});
|
||||
|
||||
layui.use(['table', 'jquery','form', 'admin', 'laydate'], function() {
|
||||
layui.use(['table', 'form', 'laydate'], function() {
|
||||
var table = layui.table,
|
||||
$ = layui.jquery,
|
||||
form = layui.form,
|
||||
admin = layui.admin,
|
||||
laydate = layui.laydate;
|
||||
|
||||
laydate.render({
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
<title>添加菜单</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<#include "${request.contextPath}/common/common.ftl">
|
||||
</head>
|
||||
|
||||
|
@ -105,14 +99,9 @@
|
|||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.extend({
|
||||
admin: '${request.contextPath}/js/admin'
|
||||
});
|
||||
layui.use(['form', 'jquery', 'util', 'admin', 'layer'], function() {
|
||||
layui.use(['form', 'util', 'layer'], function() {
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
util = layui.util,
|
||||
admin = layui.admin,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
|
|
|
@ -36,9 +36,8 @@
|
|||
|
||||
<script>
|
||||
layui.use(['table', 'treetable'], function () {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var treetable = layui.treetable;
|
||||
var table = layui.table,
|
||||
treetable = layui.treetable;
|
||||
|
||||
// 渲染表格
|
||||
layer.load(2);
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<#include "${request.contextPath}/common/common.ftl">
|
||||
</head>
|
||||
|
||||
|
@ -62,11 +57,9 @@
|
|||
layui.extend({
|
||||
admin: '${request.contextPath}/js/admin'
|
||||
});
|
||||
layui.use(['form', 'jquery', 'util', 'admin', 'layer'], function() {
|
||||
layui.use(['form', 'util', 'layer'], function() {
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
util = layui.util,
|
||||
admin = layui.admin,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
|
|
|
@ -60,11 +60,9 @@
|
|||
admin: '${request.contextPath}/js/admin'
|
||||
});
|
||||
|
||||
layui.use(['table', 'jquery','form', 'admin', 'laydate'], function() {
|
||||
layui.use(['table', 'form', 'laydate'], function() {
|
||||
var table = layui.table,
|
||||
$ = layui.jquery,
|
||||
form = layui.form,
|
||||
admin = layui.admin,
|
||||
laydate = layui.laydate;
|
||||
|
||||
laydate.render({
|
||||
|
|
|
@ -61,8 +61,7 @@
|
|||
<script src="${request.contextPath}/static/js/layui-config.js?v=1.0.4" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer','wangEditor'], function () {
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
var layer = layui.layer,
|
||||
wangEditor = layui.wangEditor;
|
||||
|
||||
var editor = new wangEditor('#editor');
|
||||
|
|
|
@ -145,8 +145,7 @@
|
|||
</div>
|
||||
<script>
|
||||
layui.use(['form', 'step'], function () {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
var form = layui.form,
|
||||
step = layui.step;
|
||||
|
||||
step.render({
|
||||
|
|
|
@ -63,8 +63,7 @@
|
|||
layui.use(['iconPickerFa', 'form', 'layer'], function () {
|
||||
var iconPickerFa = layui.iconPickerFa,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.$;
|
||||
layer = layui.layer;
|
||||
|
||||
iconPickerFa.render({
|
||||
// 选择器,推荐使用input
|
||||
|
|
|
@ -193,9 +193,8 @@
|
|||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'util', 'layer'], function () {
|
||||
layui.use(['form', 'util', 'layer'], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
util = layui.util,
|
||||
layer = layui.layer;
|
||||
|
||||
|
|
|
@ -56,8 +56,7 @@
|
|||
<!--js逻辑-->
|
||||
<script>
|
||||
layui.use(['form', 'table', 'splayer', 'sptable'], function () {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
var form = layui.form,
|
||||
table = layui.table,
|
||||
splayer = layui.splayer,
|
||||
sptable = layui.sptable;
|
||||
|
|
Loading…
Reference in New Issue