新增 Cloud 微服务模块的代码生成模板。

This commit is contained in:
thinkgem
2020-09-25 16:22:33 +08:00
parent 9e62a3b259
commit 40169ac7a9
36 changed files with 7987 additions and 26 deletions

View File

@@ -16,17 +16,17 @@
</category>
<category value="crud_cloud" label="单表/主子表 (增删改查 Cloud">
<template>crud/mapper.xml</template>
<template>cloud/entity.xml</template>
<template>crud_cloud/entity.xml</template>
<template>crud/dao.xml</template>
<template>cloud/api.xml</template>
<template>cloud/client.xml</template>
<template>cloud/service.xml</template>
<template>crud_cloud/api.xml</template>
<template>crud_cloud/client.xml</template>
<template>crud_cloud/service.xml</template>
<template>crud/controller.xml</template>
<template>crud/viewList.xml</template>
<template>crud/viewForm.xml</template>
<childTable>
<template>crud/mapper.xml</template>
<template>cloud/entity.xml</template>
<template>crud_cloud/entity.xml</template>
<template>crud/dao.xml</template>
</childTable>
</category>
@@ -132,14 +132,39 @@
<!-- 模块生成模板分类 -->
<moduleTplCategory>
<category value="module" label="生成模块代码">
<template>module/pom.xml</template>
<template>module/db/erm.xml</template>
<template>module/bin/deploy.bat.xml</template>
<template>module/bin/deploy.sh.xml</template>
<template>module/bin/package.bat.xml</template>
<template>module/bin/package.sh.xml</template>
<template>module/db/erm.xml</template>
<template>module/src/main/java/package.xml</template>
<template>module/src/main/resources/db/versions.xml</template>
<template>module/src/main/resources/config/jeesite.xml</template>
<template>module/src/main/resources/db/versions.xml</template>
<template>module/src/main/resources/static/static.xml</template>
<template>module/pom.xml</template>
</category>
<category value="module_cloud" label="生成微服务模块代码Cloud">
<template>module_cloud/client/bin/deploy.bat.xml</template>
<template>module_cloud/client/bin/deploy.sh.xml</template>
<template>module_cloud/client/bin/package.bat.xml</template>
<template>module_cloud/client/bin/package.sh.xml</template>
<template>module_cloud/client/src/main/java/package.xml</template>
<template>module_cloud/client/pom.xml</template>
<template>module_cloud/web/bin/docker-bulid.bat.xml</template>
<template>module_cloud/web/bin/docker-bulid.sh.xml</template>
<template>module_cloud/web/bin/package.bat.xml</template>
<template>module_cloud/web/bin/package.sh.xml</template>
<template>module_cloud/web/bin/run-tomcat.bat.xml</template>
<template>module_cloud/web/bin/run-tomcat.sh.xml</template>
<template>module_cloud/web/bin/run-web.bat.xml</template>
<template>module_cloud/web/bin/run-web.sh.xml</template>
<template>module_cloud/web/db/erm.xml</template>
<template>module_cloud/web/src/main/java/package.xml</template>
<template>module_cloud/web/src/main/java/startClass.xml</template>
<template>module_cloud/web/src/main/resources/config/bootstrap.xml</template>
<template>module_cloud/web/src/main/resources/config/logback-spring.xml</template>
<template>module_cloud/web/src/main/resources/static/static.xml</template>
<template>module_cloud/web/pom.xml</template>
</category>
</moduleTplCategory>
</config>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>deploy</name>
<filePath>${module.moduleCode}/bin</filePath>
<fileName>deploy.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 部署工程版本到Nexus服务器。"
echo ""
cd ..
mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/bin</filePath>
<fileName>package.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 打包Web工程生成war/jar包文件。"
echo ""
cd ..
mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>deploy</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client/bin</filePath>
<fileName>deploy.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 部署工程版本到Nexus服务器。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin
cmd /c msg %username% /time:0 /w "部署完成..."
pause]]>
</content>
</template>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>deploy</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client/bin</filePath>
<fileName>deploy.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 部署工程版本到Nexus服务器。"
echo ""
cd ..
mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client/bin</filePath>
<fileName>package.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 打包安装工程生成jar包文件。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin
cmd /c msg %username% /time:0 /w "打包完成..."
pause]]>
</content>
</template>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client/bin</filePath>
<fileName>package.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 打包Web工程生成war/jar包文件。"
echo ""
cd ..
mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>pom</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client</filePath>
<fileName>pom.xml</fileName>
<charset></charset>
<content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-cloud-parent</artifactId>
<version>${jeesiteVersion}-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
<artifactId>jeesite-cloud-module-${module.moduleCode}-client</artifactId>
<packaging>jar</packaging>
<name>JeeSite Cloud Module ${module.moduleName} Client</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
</properties>
<dependencies>
<!-- 云客户端 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-cloud-framework</artifactId>
<version>\${project.parent.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
</project>
]]>
</content>
</template>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}-client/src/main/java/com/jeesite/modules/${module.moduleCode}</filePath>
<fileName></fileName>
<content><![CDATA[
]]>
</content>
</template>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>docker-bulid</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>docker-bulid.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 打包Web工程导入到Docker服务。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package docker:stop docker:remove docker:build docker:run -Dmaven.test.skip=true -U
cd bin
pause]]>
</content>
</template>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>docker-bulid</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>docker-bulid.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 使用 Spring Boot Docker 编译 Web 工程。"
echo ""
cd ..
mvn clean package docker:stop docker:remove docker:build docker:run -Dmaven.test.skip=true -U
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>Dockerfile</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin/docker</filePath>
<fileName>Dockerfile</fileName>
<content><![CDATA[FROM frolvlad/alpine-java:jdk8-slim
MAINTAINER ThinkGem@163.com
ENV TZ "Asia/Shanghai"
ENV LANG C.UTF-8
VOLUME /tmp
WORKDIR /app
ADD ./maven/web.war ./app.war
RUN jar -xvf app.war
#RUN chmod -R 755 ./*
WORKDIR /app/WEB-INF
ADD ./app.yml ./classes/config/bootstrap-prod.yml
#ADD jeesite.lic ./
#ENV JAVA_OPTS "-Xms256m -Xmx1024m"
ENV JAVA_OPTS "$JAVA_OPTS -Dspring.profiles.active=prod"
ENTRYPOINT java $JAVA_OPTS -cp /app $JAVA_OPTS org.springframework.boot.loader.WarLauncher
EXPOSE 8983
#docker run -p 8983:8983 com.jeesite/jeesite-cloud-module-${module.moduleCode}:4.2
]]>
</content>
</template>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>app</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin/docker</filePath>
<fileName>app</fileName>
<content><![CDATA[
#======================================#
#========== Cloud settings ============#
#======================================#
# 服务注册
eureka:
# 实例设置
instance:
# 实例主机名称
hostname: 10.0.2.15
# 实例是否允许使用IP
preferIpAddress: false
# 客户端设置
client:
# 注册中心地址(集群时指定另外一个注册中心地址)
serviceUrl.defaultZone: http://10.0.2.15:8970/eureka/
#======================================#
#========== Spring settings ===========#
#======================================#
spring:
# 分布式配置中心
cloud:
config:
discovery:
enabled: true
serviceId: jeesite-cloud-config
# Consul 服务发现
consul:
host: 10.0.2.15
port: 8500
discovery:
hostname: 10.0.2.15
preferIpAddress: false
# 服务注册和配置
nacos:
discovery:
server-addr: 10.0.2.15:8848
config:
server-addr: 10.0.2.15:8848
file-extension: yml
group: jeesite-cloud-42
ext-config:
- data-id: application.yml
group: jeesite-cloud-42
]]>
</content>
</template>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>package.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 打包Web工程生成war/jar包文件。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd bin
cmd /c msg %username% /time:0 /w "打包完成..."
pause]]>
</content>
</template>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>package.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 打包Web工程生成war/jar包文件。"
echo ""
cd ..
mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd bin]]>
</content>
</template>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>run-tomcat</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>run-tomcat.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 使用 Spring Boot Tomcat 运行 Web 工程。
echo.
%~d0
cd %~dp0
cd ..
title %cd%
set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m"
call mvn clean spring-boot:run -Dmaven.test.skip=true
pause]]>
</content>
</template>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>run-tomcat</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>run-tomcat.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 使用 Spring Boot Tomcat 运行 Web 工程。"
echo ""
cd ..
MAVEN_OPTS="$MAVEN_OPTS -Xms512m -Xmx1024m"
mvn clean spring-boot:run -Dmaven.test.skip=true]]>
</content>
</template>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>run-web</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>run-web.bat</fileName>
<charset>GBK</charset>
<content><![CDATA[@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [信息] 打包Web工程并运行Web工程。
echo.
%~d0
cd %~dp0
rem 打包Web工程开始
cd ..
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd target
rem 打包Web工程结束
rem 根据情况修改 web.jar 为您的 jar 包名称
mkdir web
copy web.war web
cd web
jar -xvf web.war
cd WEB-INF
call startup.bat
pause]]>
</content>
</template>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>run-web</name>
<filePath>${module.moduleCode}/${module.moduleCode}/bin</filePath>
<fileName>run-web.sh</fileName>
<content><![CDATA[#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 打包Web工程并运行Web工程。"
echo ""
# 打包Web工程开始
cd ..
mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd target
# 打包Web工程结束
# 根据情况修改 web.jar 为您的 jar 包名称
mkdir web
cp web.war ./web
cd web
jar -xvf web.war
cd WEB-INF
exec ./startup.sh
]]>
</content>
</template>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>pom</name>
<filePath>${module.moduleCode}</filePath>
<fileName>pom.xml</fileName>
<charset></charset>
<content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>${jeesiteVersion}-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<artifactId>jeesite-module-${module.moduleCode}</artifactId>
<packaging>jar</packaging>
<name>JeeSite Module ${module.moduleName}</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-core</artifactId>
<version>\${project.parent.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
<pluginManagement>
<plugins>
</plugins>
</pluginManagement>
</build>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
</project>
]]>
</content>
</template>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>package</name>
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/java/com/jeesite/modules/${module.moduleCode}</filePath>
<fileName></fileName>
<content><![CDATA[
]]>
</content>
</template>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>start-class</name>
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/java/com/jeesite/modules</filePath>
<fileName>${@StringUtils.cap(module.moduleCode)}Application.java</fileName>
<content><![CDATA[/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.modules;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* Application
* @author ThinkGem
* @version ${@DateUtils.getDate()}
*/
@SpringCloudApplication
@EnableFeignClients(basePackages={"com.jeesite.modules"})
public class ${@StringUtils.cap(module.moduleCode)}Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(${@StringUtils.cap(module.moduleCode)}Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理而不是SpringBoot
return builder.sources(${@StringUtils.cap(module.moduleCode)}Application.class);
}
}]]>
</content>
</template>

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>bootstrap</name>
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/resources/config</filePath>
<fileName>bootstrap.yml</fileName>
<content><![CDATA[
#======================================#
#========== Server settings ===========#
#======================================#
server:
port: 8989
#======================================#
#========== Cloud settings ============#
#======================================#
# 服务注册
eureka:
# 实例设置
instance:
# 实例主机名称
hostname: 127.0.0.1
# 实例是否允许使用IP
preferIpAddress: false
# 客户端设置
client:
# 注册中心地址(集群时指定另外一个注册中心地址)
serviceUrl.defaultZone: http://127.0.0.1:8970/eureka/
#======================================#
#========== Spring settings ===========#
#======================================#
spring:
# 应用程序名称
application:
name: jeesite-cloud-module-${module.moduleCode}
# 当前环境名称(注意:不可设置为 test 它是单元测试专用的名称)
profiles:
active: default
# 分布式配置中心
cloud:
config:
discovery:
enabled: true
serviceId: jeesite-cloud-config
# Consul 服务发现
consul:
host: 127.0.0.1
port: 8500
discovery:
hostname: 127.0.0.1
preferIpAddress: false
# 服务注册和配置
nacos:
discovery:
server-addr: 127.0.0.1:8848
config:
server-addr: 127.0.0.1:8848
file-extension: yml
group: jeesite-cloud-42
ext-config:
- data-id: application.yml
group: jeesite-cloud-42
# 打印横幅
main:
bannerMode: "off"
allow-bean-definition-overriding: true
# 日志配置
logging:
config: classpath:config/logback-spring.xml
]]>
</content>
</template>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>logback-spring</name>
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/resources/config</filePath>
<fileName>logback-spring.yml</fileName>
<content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<!-- Log file path -->
<property name="log.path" value="\${logPath:-\${java.io.tmpdir:-.}}/logs" />
<!-- Framework level setting -->
<include resource="config/logger-core.xml"/>
<!-- Project level setting -->
<!-- <logger name="your.package" level="DEBUG" /> -->
<logger name="org.springframework.context.annotation.AnnotationConfigApplicationContext" level="ERROR" />
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>\${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>\${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p \${PID:- } [%15.15t] [%-39logger{39}] - %m%n%wEx</pattern>
</encoder>
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>DENY</onMatch>
<onMismatch>NEUTRAL</onMismatch>
</filter>-->
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>\${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>\${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p \${PID:- } [%15.15t] [%-39logger{39}] - %m%n%wEx</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="debug" />
<appender-ref ref="error" />
</root>
</configuration>]]>
</content>
</template>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>static</name>
<filePath>${module.moduleCode}/${module.moduleCode}/src/main/resources/static/modules/${module.moduleCode}</filePath>
<fileName></fileName>
<content><![CDATA[
]]>
</content>
</template>

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 部署工程版本到Nexus服务器。"
echo ""
cd ..
mvn clean deploy -Dmaven.test.skip=true -Pdeploy
cd bin

View File

@@ -1,18 +0,0 @@
@echo off
rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem *
rem * Author: ThinkGem@163.com
rem */
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package -Pjavadoc
cd bin
pause

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# /**
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
# *
# * Author: ThinkGem@163.com
# *
# */
echo ""
echo "[信息] 打包Web工程生成war/jar包文件。"
echo ""
cd ..
mvn clean install -Dmaven.test.skip=true -Ppackage
cd bin

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
# 温馨提示不建议直接修改此文件为了平台升级方便建议将需要修改的参数值复制到application.yml里进行覆盖该参数值。
#template:
# enabled: true

View File

@@ -0,0 +1 @@
4.2.0