Skip to content

Commit 5cb2faa

Browse files
author
guojinqiong
committed
Initial commit
0 parents  commit 5cb2faa

29 files changed

+4230
-0
lines changed

.gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/build/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/

pom.xml

+288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.xiaoju.hallowmas</groupId>
6+
<artifactId>test-case-mgt</artifactId>
7+
<packaging>jar</packaging>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<name>test-case-mgt</name>
11+
<description>project for Spring cloud eureka client</description>
12+
13+
<parent>
14+
<groupId>org.springframework.boot</groupId>
15+
<artifactId>spring-boot-starter-parent</artifactId>
16+
<version>2.0.2.RELEASE</version>
17+
<relativePath/> <!-- lookup parent from repository -->
18+
</parent>
19+
20+
<properties>
21+
<entity.target.dir>src/main/java/</entity.target.dir>
22+
<dao.resources.dir>src/main/resources/</dao.resources.dir>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
<java.version>1.8</java.version>
25+
<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>
26+
<mybatis-spring-boot>1.2.0</mybatis-spring-boot>
27+
<mysql-connector>5.1.39</mysql-connector>
28+
</properties>
29+
30+
<dependencies>
31+
<dependency>
32+
<groupId>org.springframework.cloud</groupId>
33+
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.springframework.boot</groupId>
37+
<artifactId>spring-boot-starter</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-web</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.springframework.boot</groupId>
45+
<artifactId>spring-boot-devtools</artifactId>
46+
<optional>true</optional>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.springframework</groupId>
50+
<artifactId>spring-context-support</artifactId>
51+
<version>RELEASE</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.springframework.boot</groupId>
55+
<artifactId>spring-boot-starter-test</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.mybatis.spring.boot</groupId>
60+
<artifactId>mybatis-spring-boot-starter</artifactId>
61+
<version>${mybatis-spring-boot}</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.projectlombok</groupId>
65+
<artifactId>lombok</artifactId>
66+
<version>1.16.16</version>
67+
</dependency>
68+
<!-- MySQL 连接驱动依赖 -->
69+
<dependency>
70+
<groupId>mysql</groupId>
71+
<artifactId>mysql-connector-java</artifactId>
72+
<version>${mysql-connector}</version>
73+
</dependency>
74+
<dependency>
75+
<groupId>commons-lang</groupId>
76+
<artifactId>commons-lang</artifactId>
77+
<version>2.6</version>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.apache.commons</groupId>
81+
<artifactId>commons-pool2</artifactId>
82+
<version>2.5.0</version>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.codehaus.jackson</groupId>
86+
<artifactId>jackson-mapper-asl</artifactId>
87+
<version>1.9.13</version>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.codehaus.jackson</groupId>
91+
<artifactId>jackson-core-asl</artifactId>
92+
<version>1.9.13</version>
93+
</dependency>
94+
<dependency>
95+
<groupId>com.google.guava</groupId>
96+
<artifactId>guava</artifactId>
97+
<version>15.0</version>
98+
</dependency>
99+
<dependency>
100+
<groupId>net.sf.json-lib</groupId>
101+
<artifactId>json-lib</artifactId>
102+
<version>2.4</version>
103+
<classifier>jdk15</classifier>
104+
</dependency>
105+
<dependency>
106+
<groupId>commons-lang</groupId>
107+
<artifactId>commons-lang</artifactId>
108+
<version>2.6</version>
109+
<!-- <scope>provided</scope>-->
110+
</dependency>
111+
<dependency>
112+
<groupId>com.jayway.jsonpath</groupId>
113+
<artifactId>json-path</artifactId>
114+
<version>2.2.0</version>
115+
</dependency>
116+
117+
<dependency>
118+
<groupId>org.sharegov</groupId>
119+
<artifactId>mjson</artifactId>
120+
<version>1.4.1</version>
121+
</dependency>
122+
<dependency>
123+
<groupId>joda-time</groupId>
124+
<artifactId>joda-time</artifactId>
125+
<version>2.3</version>
126+
</dependency>
127+
<!-- pinyin-->
128+
<dependency>
129+
<groupId>com.belerweb</groupId>
130+
<artifactId>pinyin4j</artifactId>
131+
<version>2.5.1</version>
132+
</dependency>
133+
<dependency>
134+
<groupId>org.jdom</groupId>
135+
<artifactId>jdom2</artifactId>
136+
<version>2.0.6</version>
137+
</dependency>
138+
<!-- ssh的依赖 -->
139+
<dependency>
140+
<groupId>ch.ethz.ganymed</groupId>
141+
<artifactId>ganymed-ssh2</artifactId>
142+
<version>build210</version>
143+
</dependency>
144+
<dependency>
145+
<groupId>com.github.javaparser</groupId>
146+
<artifactId>javaparser-core</artifactId>
147+
<version>2.4.0</version>
148+
</dependency>
149+
<dependency>
150+
<groupId>org.tmatesoft.svnkit</groupId>
151+
<artifactId>svnkit</artifactId>
152+
<version>1.8.7</version>
153+
</dependency>
154+
<dependency>
155+
<groupId>org.eclipse.jgit</groupId>
156+
<artifactId>org.eclipse.jgit</artifactId>
157+
<version>4.0.1.201506240215-r</version>
158+
<exclusions>
159+
<exclusion>
160+
<artifactId>httpclient</artifactId>
161+
<groupId>org.apache.httpcomponents</groupId>
162+
</exclusion>
163+
</exclusions>
164+
</dependency>
165+
<dependency>
166+
<groupId>org.apache.httpcomponents</groupId>
167+
<artifactId>httpclient</artifactId>
168+
<version>4.5.5</version>
169+
</dependency>
170+
<dependency>
171+
<groupId>org.apache.httpcomponents</groupId>
172+
<artifactId>httpmime</artifactId>
173+
<version>4.2.3</version>
174+
</dependency>
175+
176+
<dependency>
177+
<groupId>com.xiaoju.huhang.common</groupId>
178+
<artifactId>huhang-common</artifactId>
179+
<version>1.0-SNAPSHOT</version>
180+
</dependency>
181+
182+
</dependencies>
183+
184+
<dependencyManagement>
185+
<dependencies>
186+
<dependency>
187+
<groupId>org.springframework.cloud</groupId>
188+
<artifactId>spring-cloud-dependencies</artifactId>
189+
<version>${spring-cloud.version}</version>
190+
<type>pom</type>
191+
<scope>import</scope>
192+
</dependency>
193+
</dependencies>
194+
</dependencyManagement>
195+
196+
<build>
197+
<finalName>test-case-mgt</finalName>
198+
<plugins>
199+
<plugin>
200+
<groupId>org.mybatis.generator</groupId>
201+
<artifactId>mybatis-generator-maven-plugin</artifactId>
202+
<version>1.3.5</version>
203+
<dependencies>
204+
<!--数据库驱动 -->
205+
<dependency>
206+
<groupId>mysql</groupId>
207+
<artifactId>mysql-connector-java</artifactId>
208+
<version>5.0.5</version>
209+
</dependency>
210+
<dependency>
211+
<groupId>org.mybatis</groupId>
212+
<artifactId>mybatis-spring</artifactId>
213+
<version>1.2.2</version>
214+
</dependency>
215+
216+
<dependency>
217+
<groupId>org.mybatis</groupId>
218+
<artifactId>mybatis</artifactId>
219+
<version>3.2.4</version>
220+
</dependency>
221+
</dependencies>
222+
<executions>
223+
<execution>
224+
<id>Generate MyBatis Artifacts</id>
225+
<phase>package</phase>
226+
<goals>
227+
<goal>generate</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
<configuration>
232+
<!--允许移动生成的文件 -->
233+
<verbose>true</verbose>
234+
<!-- 是否覆盖 -->
235+
<overwrite>true</overwrite>
236+
<!-- 自动生成的配置 -->
237+
<configurationFile>
238+
src/main/resources/mybatis-generator.xml
239+
</configurationFile>
240+
</configuration>
241+
</plugin>
242+
<plugin>
243+
<artifactId>maven-compiler-plugin</artifactId>
244+
<configuration>
245+
<encoding>UTF-8</encoding>
246+
<source>1.8</source>
247+
<target>1.8</target>
248+
</configuration>
249+
</plugin>
250+
<plugin>
251+
<groupId>org.springframework.boot</groupId>
252+
<artifactId>spring-boot-maven-plugin</artifactId>
253+
<configuration>
254+
<fork>true</fork>
255+
<jvmArguments>
256+
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5001
257+
</jvmArguments>
258+
</configuration>
259+
<dependencies>
260+
<dependency>
261+
<groupId>org.springframework</groupId>
262+
<artifactId>springloaded</artifactId>
263+
<version>1.2.6.RELEASE</version>
264+
</dependency>
265+
</dependencies>
266+
</plugin>
267+
</plugins>
268+
</build>
269+
270+
<repositories>
271+
<repository>
272+
<id>spring-snapshots</id>
273+
<name>Spring Snapshots</name>
274+
<url>https://repo.spring.io/snapshot</url>
275+
<snapshots>
276+
<enabled>true</enabled>
277+
</snapshots>
278+
</repository>
279+
<repository>
280+
<id>spring-milestones</id>
281+
<name>Spring Milestones</name>
282+
<url>https://repo.spring.io/milestone</url>
283+
<snapshots>
284+
<enabled>false</enabled>
285+
</snapshots>
286+
</repository>
287+
</repositories>
288+
</project>

sql/tcm.sql

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Create syntax for TABLE 'case'
2+
DROP TABLE IF EXISTS `test_case`;
3+
CREATE TABLE `test_case` (
4+
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT "用例id",
5+
`case_name` varchar(30) DEFAULT NULL COMMENT "用例名称",
6+
`case_explain` TEXT DEFAULT NULL COMMENT "说明",
7+
`status` int(11) NOT NULL COMMENT "状态 0:有效 1:无效",
8+
`gmt_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "修改时间",
9+
`gmt_create` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT "创建时间",
10+
`deleted` TINYINT(4) NOT NULL DEFAULT '0',
11+
`ownner` varchar(255) DEFAULT NULL COMMENT "修改人"
12+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13+
ALTER TABLE `test_case` COMMENT='测试用例表';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.xiaoju.hallowmas;
2+
3+
import com.xiaoju.hallowmas.filter.LogRequestFilter;
4+
import lombok.extern.java.Log;
5+
import org.mybatis.spring.annotation.MapperScan;
6+
import org.springframework.boot.SpringApplication;
7+
import org.springframework.boot.autoconfigure.SpringBootApplication;
8+
import org.springframework.boot.web.servlet.FilterRegistrationBean;
9+
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
10+
import org.springframework.context.annotation.Bean;
11+
12+
import java.util.ArrayList;
13+
import java.util.List;
14+
15+
@EnableEurekaClient
16+
@SpringBootApplication
17+
@MapperScan("com.xiaoju.hallowmas.mapper")
18+
@Log
19+
public class TestCaseMgtApplication {
20+
public static void main(String[] args) {
21+
SpringApplication.run(TestCaseMgtApplication.class, args);
22+
}
23+
24+
@Bean
25+
public FilterRegistrationBean filterRegistrationBean() {
26+
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
27+
LogRequestFilter logRequestFilter = new LogRequestFilter();
28+
registrationBean.setFilter(logRequestFilter);
29+
List<String> urlPatterns = new ArrayList<>();
30+
urlPatterns.add("/*");
31+
registrationBean.setUrlPatterns(urlPatterns);
32+
return registrationBean;
33+
}
34+
}

0 commit comments

Comments
 (0)