master
gk 2022-02-19 21:30:44 +08:00
parent 045d71322d
commit de8473b698
18 changed files with 408 additions and 61 deletions

View File

@ -18,19 +18,16 @@
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/kdayun-admin"/>
<classpathentry combineaccessrules="false" kind="src" path="/kdayun-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/kdayun-manager"/>
<classpathentry combineaccessrules="false" kind="src" path="/kdayun-report"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -54,6 +54,11 @@
<artifactId>kdayun-baidu</artifactId> <artifactId>kdayun-baidu</artifactId>
<version>1.0.1</version> <version>1.0.1</version>
</dependency> </dependency>
<dependency>
<groupId>com.kdayun</groupId>
<artifactId>kdayun-demo</artifactId>
<version>1.0.1</version>
</dependency>
<dependency> <dependency>
<groupId>com.github.bingoohuang</groupId> <groupId>com.github.bingoohuang</groupId>
<artifactId>patchca</artifactId> <artifactId>patchca</artifactId>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

1
modules/kdayun-demo/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target/

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>kdayun-demo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.springframework.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,8 @@
cd /d %~dp0
set JAVA_HOME="D:\BS\Server\tomcat8\jdk"
set mavenpath=H:\M\BS\maven\apache-maven-3.2.5\bin\mvn
call jar.bat
call jar-source.bat
call maveninstall.bat

View File

@ -0,0 +1,5 @@
cd /d %~dp0
mvn source:jar -Dmaven.test.skip=true

View File

@ -0,0 +1,3 @@
cd /d %~dp0
mvn clean package -Dmaven.test.skip=true

View File

@ -0,0 +1,6 @@
cd /d %~dp0
set JAVA_HOME="D:\BS\Server\tomcat8\jdk"
set mavenpath=H:\M\BS\maven\apache-maven-3.2.5\bin\mvn
mvn deploy -Dmaven.test.skip=true
pause

View File

@ -0,0 +1 @@
%mavenpath% install -Dmaven.test.skip=true

122
modules/kdayun-demo/pom.xml Normal file
View File

@ -0,0 +1,122 @@
<?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>
<artifactId>kdayun-root</artifactId>
<groupId>com.kdayun</groupId>
<version>5.0.0</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.1</version>
<artifactId>kdayun-demo</artifactId>
<name>kdayun-demo</name>
<!-- FIXME change it to the project's website -->
<url>http://www.kdayun.com</url>
<description>快搭科技(上海)有限公司-企业微信库</description>
<dependencies>
<dependency>
<groupId>com.kdayun</groupId>
<artifactId>kdayun-core</artifactId>
<version>${base.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
<id>kdayun-releases</id>
<url>http://develop.kdayun.com:8081/repository/maven-local/</url>
</repository>
<snapshotRepository>
<id>kdayun-snapshots</id>
<url>http://develop.kdayun.com:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<!-- 生成源码包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-xmls</id>
<phase>process-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-${jdk.version}</id>
<!-- 另外一种激活方式 -->
<activation>
<activeByDefault>true</activeByDefault>
<jdk>${jdk.version}</jdk>
</activation>
<properties>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<maven.compiler.compilerVersion>${jdk.version}</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

View File

@ -0,0 +1,39 @@
package com.kdayun.demo.controller;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.kdayun.demo.service.DemoService;
import com.kdayun.z1.core.base.BaseController;
import com.kdayun.z1.core.base.RetVo;
import com.kdayun.z1.core.base.RetVo.retstate;
/**
*
*
* @author gk
*
*/
@Controller
@RequestMapping("demo")
public class DemoController extends BaseController {
@Autowired
DemoService demoService;
/**
*
*/
@RequestMapping(value = "hello", method = RequestMethod.GET)
public RetVo upload(HttpServletRequest request, HttpServletResponse response) throws Exception {
return RetVo.getNewInstance(retstate.OK, "hello", null);
}
}

View File

@ -0,0 +1,14 @@
package com.kdayun.demo.service;
public interface DemoService {
/**
* 访AccessToken
*/
String getAccessToken();
/**
* 访AccessToken 使
*/
String refreshAccessToken();
}

View File

@ -0,0 +1,29 @@
package com.kdayun.demo.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.kdayun.demo.service.DemoService;
import com.kdayun.demo.util.Utils;
@Service
public class DemoServiceImpl implements DemoService {
public static String baiduAccessToken = "";
@Override
public String getAccessToken() {
if (StringUtils.isNotBlank(baiduAccessToken)) {
return baiduAccessToken;
} else {
baiduAccessToken = Utils.getAccessToken();
}
return baiduAccessToken;
}
@Override
public String refreshAccessToken() {
baiduAccessToken = Utils.getAccessToken();
return baiduAccessToken;
}
}

View File

@ -0,0 +1,21 @@
package com.kdayun.demo.util;
import org.springframework.beans.factory.annotation.Value;
public class Utils {
@Value("${demo.appid}")
private String appid;
@Value("${demo.appkey}")
private String appkey;
@Value("${demo.secretkey}")
private String secretkey;
/**
* Accesstoken
*/
public static String getAccessToken() {
return "";
}
}

View File

@ -0,0 +1,24 @@
package com.kdayun.report;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
*
* @package com.kdayun.demo
* @author qjb
* @email qjb@kdayun.com.cn
* @date 20193265:05:43
* @company ()
* @desc
*/
public class AppTest {
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue() {
assertTrue(true);
}
}

81
pom.xml
View File

@ -13,10 +13,7 @@
</parent> </parent>
<modules> <modules>
<module>modules/kdayun-app</module> <module>modules/kdayun-app</module>
<module>modules/kdayun-manager</module> <module>modules/kdayun-demo</module>
<module>modules/kdayun-core</module>
<module>modules/kdayun-admin</module>
<module>modules/kdayun-report</module>
</modules> </modules>
<properties> <properties>
<!-- 指明编码 在打包时候可以消除警告 Using platform encoding (GBK actually) to copy filtered <!-- 指明编码 在打包时候可以消除警告 Using platform encoding (GBK actually) to copy filtered
@ -233,23 +230,23 @@
</exclusions> </exclusions>
</dependency> </dependency>
--> -->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId> <artifactId>log4j-api</artifactId>
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$--> <version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <artifactId>log4j-core</artifactId>
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$--> <version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
</dependency> </dependency>
<!--不加下面这个依赖mybatis sql日志打印有问题--> <!--不加下面这个依赖mybatis sql日志打印有问题-->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId> <artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$--> <version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -444,8 +441,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -468,8 +465,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -480,8 +477,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -492,8 +489,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -544,8 +541,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -556,8 +553,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -568,8 +565,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -580,8 +577,8 @@
<version>${workflow.version}</version> <version>${workflow.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
@ -880,8 +877,8 @@
</dependency> </dependency>
<!--redis --> <!--redis -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId> <artifactId>spring-boot-starter-cache</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.data</groupId> <groupId>org.springframework.data</groupId>
@ -986,8 +983,8 @@
<url>http://develop.kdayun.com:8081/repository/maven-local/</url> <url>http://develop.kdayun.com:8081/repository/maven-local/</url>
</repository> </repository>
<snapshotRepository> <snapshotRepository>
<id>kdayun-snapshots</id> <id>kdayun-snapshots</id>
<url>http://develop.kdayun.com:8081/repository/maven-snapshots/</url> <url>http://develop.kdayun.com:8081/repository/maven-snapshots/</url>
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
</project> </project>