Skip to content

Commit 3715dc3

Browse files
committed
更新测试。
1 parent fd04abd commit 3715dc3

File tree

7 files changed

+224
-212
lines changed

7 files changed

+224
-212
lines changed

pom.xml

Lines changed: 168 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,175 +1,181 @@
11
<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/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>com.github.abel533</groupId>
6-
<artifactId>mapper</artifactId>
7-
<version>3.0.0</version>
8-
<packaging>jar</packaging>
5+
<groupId>com.github.abel533</groupId>
6+
<artifactId>mapper</artifactId>
7+
<version>3.0.0</version>
8+
<packaging>jar</packaging>
99

10-
<name>mapper</name>
11-
<description>Mybatis通用Mapper</description>
12-
<url>https://github.com/abel533/Mapper</url>
10+
<name>mapper</name>
11+
<description>Mybatis通用Mapper</description>
12+
<url>https://github.com/abel533/Mapper</url>
1313

14-
<licenses>
15-
<license>
16-
<name>The MIT License (MIT)</name>
17-
<url>https://github.com/abel533/Mapper/blob/master/LICENSE</url>
18-
</license>
19-
</licenses>
14+
<licenses>
15+
<license>
16+
<name>The MIT License (MIT)</name>
17+
<url>https://github.com/abel533/Mapper/blob/master/LICENSE</url>
18+
</license>
19+
</licenses>
2020

21-
<developers>
22-
<developer>
23-
<name>abel533</name>
24-
<email>abel533@gmail.com</email>
25-
</developer>
26-
</developers>
21+
<developers>
22+
<developer>
23+
<name>abel533</name>
24+
<email>abel533@gmail.com</email>
25+
</developer>
26+
</developers>
2727

28-
<scm>
29-
<connection>scm:git@github.com:abel533/Mapper.git</connection>
30-
<developerConnection>scm:git@github.com:abel533/Mapper.git</developerConnection>
31-
<url>git@github.com:abel533/Mapper.git</url>
32-
</scm>
28+
<scm>
29+
<connection>scm:git@github.com:abel533/Mapper.git</connection>
30+
<developerConnection>scm:git@github.com:abel533/Mapper.git</developerConnection>
31+
<url>git@github.com:abel533/Mapper.git</url>
32+
</scm>
3333

34-
<properties>
35-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
</properties>
34+
<properties>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
</properties>
3737

38-
<dependencies>
39-
<!--必须依赖-->
40-
<dependency>
41-
<groupId>javax.persistence</groupId>
42-
<artifactId>persistence-api</artifactId>
43-
<version>1.0</version>
44-
</dependency>
45-
<dependency>
46-
<groupId>commons-beanutils</groupId>
47-
<artifactId>commons-beanutils</artifactId>
48-
<version>1.9.2</version>
49-
</dependency>
38+
<dependencies>
39+
<!--必须依赖-->
40+
<dependency>
41+
<groupId>javax.persistence</groupId>
42+
<artifactId>persistence-api</artifactId>
43+
<version>1.0</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>commons-beanutils</groupId>
47+
<artifactId>commons-beanutils</artifactId>
48+
<version>1.9.2</version>
49+
</dependency>
5050

51-
<!--可选依赖-->
52-
<dependency>
53-
<groupId>org.mybatis</groupId>
54-
<artifactId>mybatis</artifactId>
55-
<version>3.2.6</version>
56-
<scope>compile</scope>
57-
<optional>true</optional>
58-
</dependency>
59-
<!-- Mybatis Generator -->
60-
<dependency>
61-
<groupId>org.mybatis.generator</groupId>
62-
<artifactId>mybatis-generator-core</artifactId>
63-
<version>1.3.2</version>
64-
<scope>compile</scope>
65-
<optional>true</optional>
66-
</dependency>
51+
<!--可选依赖-->
52+
<dependency>
53+
<groupId>org.mybatis</groupId>
54+
<artifactId>mybatis</artifactId>
55+
<version>3.2.6</version>
56+
<scope>compile</scope>
57+
<optional>true</optional>
58+
</dependency>
59+
<!-- Mybatis Generator -->
60+
<dependency>
61+
<groupId>org.mybatis.generator</groupId>
62+
<artifactId>mybatis-generator-core</artifactId>
63+
<version>1.3.2</version>
64+
<scope>compile</scope>
65+
<optional>true</optional>
66+
</dependency>
6767

68-
<!--测试-->
69-
<dependency>
70-
<groupId>junit</groupId>
71-
<artifactId>junit</artifactId>
72-
<version>4.11</version>
73-
<scope>test</scope>
74-
</dependency>
75-
<dependency>
76-
<groupId>log4j</groupId>
77-
<artifactId>log4j</artifactId>
78-
<version>1.2.17</version>
79-
<scope>test</scope>
80-
</dependency>
81-
<dependency>
82-
<groupId>org.hsqldb</groupId>
83-
<artifactId>hsqldb</artifactId>
84-
<version>2.2.9</version>
85-
<scope>test</scope>
86-
</dependency>
87-
<dependency>
88-
<groupId>mysql</groupId>
89-
<artifactId>mysql-connector-java</artifactId>
90-
<version>5.1.29</version>
91-
<scope>test</scope>
92-
</dependency>
93-
</dependencies>
68+
<!--测试-->
69+
<dependency>
70+
<groupId>junit</groupId>
71+
<artifactId>junit</artifactId>
72+
<version>4.11</version>
73+
<scope>test</scope>
74+
</dependency>
75+
<dependency>
76+
<groupId>log4j</groupId>
77+
<artifactId>log4j</artifactId>
78+
<version>1.2.17</version>
79+
<scope>test</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.hsqldb</groupId>
83+
<artifactId>hsqldb</artifactId>
84+
<version>2.2.9</version>
85+
<scope>test</scope>
86+
</dependency>
87+
<dependency>
88+
<groupId>mysql</groupId>
89+
<artifactId>mysql-connector-java</artifactId>
90+
<version>5.1.29</version>
91+
<scope>test</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>net.sourceforge.jtds</groupId>
95+
<artifactId>jtds</artifactId>
96+
<version>1.3.1</version>
97+
<scope>test</scope>
98+
</dependency>
99+
</dependencies>
94100

95-
<build>
96-
<testResources>
97-
<testResource>
98-
<directory>src/test/resources</directory>
99-
</testResource>
100-
<testResource>
101-
<directory>src/test/java</directory>
102-
</testResource>
103-
</testResources>
104-
</build>
101+
<build>
102+
<testResources>
103+
<testResource>
104+
<directory>src/test/resources</directory>
105+
</testResource>
106+
<testResource>
107+
<directory>src/test/java</directory>
108+
</testResource>
109+
</testResources>
110+
</build>
105111

106-
<profiles>
107-
<profile>
108-
<id>release</id>
109-
<build>
110-
<plugins>
111-
<!--Compiler-->
112-
<plugin>
113-
<artifactId>maven-compiler-plugin</artifactId>
114-
<configuration>
115-
<source>1.6</source>
116-
<target>1.6</target>
117-
</configuration>
118-
</plugin>
119-
<!-- Source -->
120-
<plugin>
121-
<groupId>org.apache.maven.plugins</groupId>
122-
<artifactId>maven-source-plugin</artifactId>
123-
<version>2.2.1</version>
124-
<executions>
125-
<execution>
126-
<phase>package</phase>
127-
<goals>
128-
<goal>jar-no-fork</goal>
129-
</goals>
130-
</execution>
131-
</executions>
132-
</plugin>
133-
<!-- Javadoc -->
134-
<plugin>
135-
<groupId>org.apache.maven.plugins</groupId>
136-
<artifactId>maven-javadoc-plugin</artifactId>
137-
<version>2.9.1</version>
138-
<executions>
139-
<execution>
140-
<phase>package</phase>
141-
<goals>
142-
<goal>jar</goal>
143-
</goals>
144-
</execution>
145-
</executions>
146-
</plugin>
147-
<!-- GPG mvn clean deploy -P release -Dgpg.passphrase=YourPassphase-->
148-
<plugin>
149-
<groupId>org.apache.maven.plugins</groupId>
150-
<artifactId>maven-gpg-plugin</artifactId>
151-
<executions>
152-
<execution>
153-
<id>sign-artifacts</id>
154-
<phase>verify</phase>
155-
<goals>
156-
<goal>sign</goal>
157-
</goals>
158-
</execution>
159-
</executions>
160-
</plugin>
161-
</plugins>
162-
</build>
163-
<distributionManagement>
164-
<snapshotRepository>
165-
<id>oss</id>
166-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
167-
</snapshotRepository>
168-
<repository>
169-
<id>oss</id>
170-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
171-
</repository>
172-
</distributionManagement>
173-
</profile>
174-
</profiles>
112+
<profiles>
113+
<profile>
114+
<id>release</id>
115+
<build>
116+
<plugins>
117+
<!--Compiler-->
118+
<plugin>
119+
<artifactId>maven-compiler-plugin</artifactId>
120+
<configuration>
121+
<source>1.6</source>
122+
<target>1.6</target>
123+
</configuration>
124+
</plugin>
125+
<!-- Source -->
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-source-plugin</artifactId>
129+
<version>2.2.1</version>
130+
<executions>
131+
<execution>
132+
<phase>package</phase>
133+
<goals>
134+
<goal>jar-no-fork</goal>
135+
</goals>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
<!-- Javadoc -->
140+
<plugin>
141+
<groupId>org.apache.maven.plugins</groupId>
142+
<artifactId>maven-javadoc-plugin</artifactId>
143+
<version>2.9.1</version>
144+
<executions>
145+
<execution>
146+
<phase>package</phase>
147+
<goals>
148+
<goal>jar</goal>
149+
</goals>
150+
</execution>
151+
</executions>
152+
</plugin>
153+
<!-- GPG mvn clean deploy -P release -Dgpg.passphrase=YourPassphase-->
154+
<plugin>
155+
<groupId>org.apache.maven.plugins</groupId>
156+
<artifactId>maven-gpg-plugin</artifactId>
157+
<executions>
158+
<execution>
159+
<id>sign-artifacts</id>
160+
<phase>verify</phase>
161+
<goals>
162+
<goal>sign</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
</plugins>
168+
</build>
169+
<distributionManagement>
170+
<snapshotRepository>
171+
<id>oss</id>
172+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
173+
</snapshotRepository>
174+
<repository>
175+
<id>oss</id>
176+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
177+
</repository>
178+
</distributionManagement>
179+
</profile>
180+
</profiles>
175181
</project>

src/test/java/com/github/abel533/mapper/CountryJDBCMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
/**
3030
* Created by liuzh on 2014/11/19.
3131
*/
32-
public interface CountryJDBCMapper extends Mapper<CountryJDBC> {
32+
public interface CountryJDBCMapper extends SqlServerMapper<CountryJDBC> {
3333
int insertA(CountryJDBC countryJDBC);
3434
}

src/test/java/com/github/abel533/mapper/MybatisJavaHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public class MybatisJavaHelper {
5353
mapperHelper.registerMapper(Mapper.class);
5454
mapperHelper.registerMapper(HsqldbMapper.class);
5555
mapperHelper.registerMapper(MySqlMapper.class);
56+
mapperHelper.registerMapper(SqlServerMapper.class);
5657
//配置完成后,执行下面的操作
5758
mapperHelper.processConfiguration(session.getConfiguration());
5859
//OK - mapperHelper的任务已经完成,可以不管了

src/test/java/com/github/abel533/model/CountryJDBC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Author: liuzh
3434
* Update: liuzh(2014-06-06 13:38)
3535
*/
36-
@Table(name = "country_jdbc")
36+
@Table(name = "country")
3737
public class CountryJDBC {
3838
@Id
3939
@GeneratedValue(generator = "JDBC")

0 commit comments

Comments
 (0)