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:
parent
7ee5444fce
commit
ad15cb3382
10
build.gradle
10
build.gradle
@ -2,16 +2,26 @@ group 'mybatis'
|
|||||||
version '1.0-SNAPSHOT'
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
|
apply plugin: 'maven'
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'war'
|
apply plugin: 'war'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "http://maven.petrikainulainen.net/repo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.codehaus.groovy:groovy-all:2.3.11'
|
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'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
}
|
}
|
||||||
|
BIN
build/libs/mybatis-1.0-SNAPSHOT.war
Normal file
BIN
build/libs/mybatis-1.0-SNAPSHOT.war
Normal file
Binary file not shown.
2
build/resources/main/mybatis.properties
Normal file
2
build/resources/main/mybatis.properties
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
mapping=com.thinker.mapping
|
||||||
|
mapper=com.thinker.mapper
|
0
build/resources/test/readme.md
Normal file
0
build/resources/test/readme.md
Normal file
2
build/tmp/war/MANIFEST.MF
Normal file
2
build/tmp/war/MANIFEST.MF
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
|
@ -1,4 +1,6 @@
|
|||||||
package com.mybatis.util;
|
package com.test.util;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -9,7 +11,7 @@ import java.util.Properties;
|
|||||||
public class Base {
|
public class Base {
|
||||||
private static Properties prop;
|
private static Properties prop;
|
||||||
private static InputStream in;
|
private static InputStream in;
|
||||||
// private static Logger log = Logger.getLogger(Base.class);
|
private static Logger log = Logger.getLogger(Base.class);
|
||||||
static {
|
static {
|
||||||
prop = new Properties();
|
prop = new Properties();
|
||||||
in = Base.class.getResourceAsStream("/mybatis.properties");
|
in = Base.class.getResourceAsStream("/mybatis.properties");
|
||||||
@ -33,7 +35,5 @@ public class Base {
|
|||||||
public static String getMapper(){
|
public static String getMapper(){
|
||||||
return prop.getProperty("mapper").trim();
|
return prop.getProperty("mapper").trim();
|
||||||
}
|
}
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println(Base.getMapping());
|
|
||||||
}
|
|
||||||
}
|
}
|
11
src/test/java/com/test/util/BaseTest.java
Normal file
11
src/test/java/com/test/util/BaseTest.java
Normal 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());
|
||||||
|
}
|
||||||
|
}
|
0
src/test/resources/readme.md
Normal file
0
src/test/resources/readme.md
Normal file
Reference in New Issue
Block a user