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
This commit is contained in:
lzh984294471 2016-06-14 17:42:36 +08:00
parent 7ee5444fce
commit ad15cb3382
8 changed files with 30 additions and 5 deletions

View File

@ -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'
}

Binary file not shown.

View File

@ -0,0 +1,2 @@
mapping=com.thinker.mapping
mapper=com.thinker.mapper

View File

View File

@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@ -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());
}
}

View File

@ -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());
}
}

View File