From ad15cb3382c2e8a87945c8ad20683b21acd3ca83 Mon Sep 17 00:00:00 2001 From: lzh984294471 <984294471@qq.com> Date: Tue, 14 Jun 2016 17:42:36 +0800 Subject: [PATCH] modified: build.gradle new file: build/libs/mybatis-1.0-SNAPSHOT.war new file: build/resources/main/mybatis.properties new file: build/resources/test/readme.md new file: build/tmp/war/MANIFEST.MF renamed: src/main/java/com/mybatis/util/Base.java -> src/main/java/com/test/util/Base.java new file: src/test/java/com/test/util/BaseTest.java new file: src/test/resources/readme.md --- build.gradle | 10 ++++++++++ build/libs/mybatis-1.0-SNAPSHOT.war | Bin 0 -> 2707 bytes build/resources/main/mybatis.properties | 2 ++ build/resources/test/readme.md | 0 build/tmp/war/MANIFEST.MF | 2 ++ .../java/com/{mybatis => test}/util/Base.java | 10 +++++----- src/test/java/com/test/util/BaseTest.java | 11 +++++++++++ src/test/resources/readme.md | 0 8 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 build/libs/mybatis-1.0-SNAPSHOT.war create mode 100644 build/resources/main/mybatis.properties create mode 100644 build/resources/test/readme.md create mode 100644 build/tmp/war/MANIFEST.MF rename src/main/java/com/{mybatis => test}/util/Base.java (80%) create mode 100644 src/test/java/com/test/util/BaseTest.java create mode 100644 src/test/resources/readme.md diff --git a/build.gradle b/build.gradle index 202d27b..713d90e 100644 --- a/build.gradle +++ b/build.gradle @@ -2,16 +2,26 @@ group 'mybatis' version '1.0-SNAPSHOT' apply plugin: 'groovy' +apply plugin: 'maven' apply plugin: 'java' apply plugin: 'war' sourceCompatibility = 1.8 +targetCompatibility = 1.8 repositories { mavenCentral() } +repositories { + maven { + url "http://maven.petrikainulainen.net/repo" + } +} + dependencies { compile 'org.codehaus.groovy:groovy-all:2.3.11' + compile 'log4j:log4j:1.2.17' + compile 'MySQL:mysql-connector-java:6.0.2' testCompile group: 'junit', name: 'junit', version: '4.11' } diff --git a/build/libs/mybatis-1.0-SNAPSHOT.war b/build/libs/mybatis-1.0-SNAPSHOT.war new file mode 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{or=jAhO$o!*EGvs_BIO{qWsB8*K)=ttUb+xoi2s~;uqs*60Qu){pv6l1Q3f5UT#=Pa#*^;BXcXBvy?BP2eZ4qm@D}tnVl;$m8`r($;2?_T(caKkJ zj(#88_d|`Z>Eb?eJ2Y53wi7?}?nSlWU1Og0i9YHj_o<`S(UQdG*gTRtTO&|%^hE!{# zn*dS`YZ8DeX9xgUTn1#qs#JWsKvgvafOO3RGGV%46)`^Dpo$v;1Q`B0o&z$`b%UyL zd?tXZaR>mJzywTA*i3*`>iA4jgc$@3_`i;J1WW=~@#w~(SMe|tw=~uhV;rKwM>iO~ zbV3*`%Zlk^%(4pEJZyy#!n``5dGMkMSsS)oi_q2sY}CL49-4;(yjg*Q3=G^r2y7KH I%wPxc06l}OVgLXD literal 0 HcmV?d00001 diff --git a/build/resources/main/mybatis.properties b/build/resources/main/mybatis.properties new file mode 100644 index 0000000..8f6d497 --- /dev/null +++ b/build/resources/main/mybatis.properties @@ -0,0 +1,2 @@ +mapping=com.thinker.mapping +mapper=com.thinker.mapper \ No newline at end of file diff --git a/build/resources/test/readme.md b/build/resources/test/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/build/tmp/war/MANIFEST.MF b/build/tmp/war/MANIFEST.MF new file mode 100644 index 0000000..58630c0 --- /dev/null +++ b/build/tmp/war/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/src/main/java/com/mybatis/util/Base.java b/src/main/java/com/test/util/Base.java similarity index 80% rename from src/main/java/com/mybatis/util/Base.java rename to src/main/java/com/test/util/Base.java index 0f0337b..8f7413e 100644 --- a/src/main/java/com/mybatis/util/Base.java +++ b/src/main/java/com/test/util/Base.java @@ -1,4 +1,6 @@ -package com.mybatis.util; +package com.test.util; + +import org.apache.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -9,7 +11,7 @@ import java.util.Properties; public class Base { private static Properties prop; private static InputStream in; -// private static Logger log = Logger.getLogger(Base.class); + private static Logger log = Logger.getLogger(Base.class); static { prop = new Properties(); in = Base.class.getResourceAsStream("/mybatis.properties"); @@ -33,7 +35,5 @@ public class Base { public static String getMapper(){ return prop.getProperty("mapper").trim(); } - public static void main(String[] args) { - System.out.println(Base.getMapping()); - } + } diff --git a/src/test/java/com/test/util/BaseTest.java b/src/test/java/com/test/util/BaseTest.java new file mode 100644 index 0000000..610162e --- /dev/null +++ b/src/test/java/com/test/util/BaseTest.java @@ -0,0 +1,11 @@ +package com.test.util; + +/** + * Created by lzh on 16-6-13. + */ +public class BaseTest { + public static void main(String[] args) { + System.out.println(Base.getMapping()); + System.out.println(Base.getMapper()); + } +} diff --git a/src/test/resources/readme.md b/src/test/resources/readme.md new file mode 100644 index 0000000..e69de29