1.01
parent
045d71322d
commit
de8473b698
|
@ -18,19 +18,16 @@
|
|||
</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="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</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"/>
|
||||
</classpath>
|
||||
|
|
|
@ -54,6 +54,11 @@
|
|||
<artifactId>kdayun-baidu</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.kdayun</groupId>
|
||||
<artifactId>kdayun-demo</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.bingoohuang</groupId>
|
||||
<artifactId>patchca</artifactId>
|
||||
|
|
|
@ -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>
|
|
@ -0,0 +1 @@
|
|||
/target/
|
|
@ -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>
|
|
@ -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
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
cd /d %~dp0
|
||||
|
||||
mvn source:jar -Dmaven.test.skip=true
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
cd /d %~dp0
|
||||
|
||||
mvn clean package -Dmaven.test.skip=true
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
%mavenpath% install -Dmaven.test.skip=true
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.kdayun.demo.service;
|
||||
|
||||
public interface DemoService {
|
||||
|
||||
/**
|
||||
* 获取百度云的访问AccessToken
|
||||
*/
|
||||
String getAccessToken();
|
||||
|
||||
/**
|
||||
* 刷新百度云的访问AccessToken 失效时候使用
|
||||
*/
|
||||
String refreshAccessToken();
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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 "";
|
||||
}
|
||||
|
||||
}
|
|
@ -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 2019年3月26日下午5:05:43
|
||||
* @company 快搭科技(上海)有限公司
|
||||
* @desc
|
||||
*/
|
||||
public class AppTest {
|
||||
/**
|
||||
* Rigorous Test :-)
|
||||
*/
|
||||
@Test
|
||||
public void shouldAnswerWithTrue() {
|
||||
assertTrue(true);
|
||||
}
|
||||
}
|
109
pom.xml
109
pom.xml
|
@ -13,10 +13,7 @@
|
|||
</parent>
|
||||
<modules>
|
||||
<module>modules/kdayun-app</module>
|
||||
<module>modules/kdayun-manager</module>
|
||||
<module>modules/kdayun-core</module>
|
||||
<module>modules/kdayun-admin</module>
|
||||
<module>modules/kdayun-report</module>
|
||||
<module>modules/kdayun-demo</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<!-- 指明编码 在打包时候可以消除警告 Using platform encoding (GBK actually) to copy filtered
|
||||
|
@ -233,23 +230,23 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$-->
|
||||
</dependency>
|
||||
<!--不加下面这个依赖mybatis sql日志打印有问题-->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>${log4j.version}</version><!--$NO-MVN-MAN-VER$-->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
|
||||
</dependency>
|
||||
<!--不加下面这个依赖mybatis sql日志打印有问题-->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>${log4j.version}</version> <!--$NO-MVN-MAN-VER$-->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
|
@ -444,9 +441,9 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
@ -468,10 +465,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -480,10 +477,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -492,10 +489,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -544,10 +541,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -556,10 +553,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -568,10 +565,10 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -580,9 +577,9 @@
|
|||
<version>${workflow.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
@ -880,8 +877,8 @@
|
|||
</dependency>
|
||||
<!--redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
|
@ -986,8 +983,8 @@
|
|||
<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>
|
||||
<id>kdayun-snapshots</id>
|
||||
<url>http://develop.kdayun.com:8081/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
Loading…
Reference in New Issue