新增文件
This commit is contained in:
parent
414edce9a4
commit
efe9a4595a
19
src/main/java/osc/git/eh3/annotation/PkgAnnotation.java
Normal file
19
src/main/java/osc/git/eh3/annotation/PkgAnnotation.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package osc.git.eh3.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lixiangrong
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Target(ElementType.PACKAGE)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@interface PkgAnnotation {
|
||||||
|
|
||||||
|
}
|
18
src/main/java/osc/git/eh3/annotation/TestPkgAnnotation.java
Normal file
18
src/main/java/osc/git/eh3/annotation/TestPkgAnnotation.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package osc.git.eh3.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.Annotation;
|
||||||
|
|
||||||
|
public class TestPkgAnnotation {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Package pkg = Package.getPackage("osc.git.eh3.annotation");
|
||||||
|
Annotation[] annotations = pkg.getAnnotations();
|
||||||
|
for (Annotation annotation : annotations) {
|
||||||
|
System.out.println(annotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================友好类和包内访问常量==============
|
||||||
|
new MyPackageMethod().myPackageMethod();
|
||||||
|
System.out.println(MyPackageConst.PACKAGE_STRING);
|
||||||
|
}
|
||||||
|
}
|
25
src/main/java/osc/git/eh3/annotation/package-info.java
Normal file
25
src/main/java/osc/git/eh3/annotation/package-info.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @author lixiangrong
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@PkgAnnotation
|
||||||
|
package osc.git.eh3.annotation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包内方法
|
||||||
|
*/
|
||||||
|
class MyPackageMethod {
|
||||||
|
public void myPackageMethod() {
|
||||||
|
System.out.println("MyPackageMethod...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包内常量
|
||||||
|
*/
|
||||||
|
class MyPackageConst {
|
||||||
|
static final java.lang.String PACKAGE_STRING = "myPackageConst";
|
||||||
|
}
|
31
src/main/resources/generatorConfig.xml
Normal file
31
src/main/resources/generatorConfig.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE generatorConfiguration
|
||||||
|
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||||
|
<generatorConfiguration>
|
||||||
|
<classPathEntry location="C:\Users\lixiangrong\.m2\repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar"/>
|
||||||
|
<context id="DB2Tables" targetRuntime="MyBatis3">
|
||||||
|
<commentGenerator>
|
||||||
|
<property name="suppressDate" value="true"/>
|
||||||
|
<property name="suppressAllComments" value="true"/>
|
||||||
|
</commentGenerator>
|
||||||
|
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.3.166/wins-dsp-new" userId="root" password="pxene">
|
||||||
|
</jdbcConnection>
|
||||||
|
<javaTypeResolver>
|
||||||
|
<property name="forceBigDecimals" value="false"/>
|
||||||
|
</javaTypeResolver>
|
||||||
|
<javaModelGenerator targetPackage="com.pxene.dsp.archer.model" targetProject="src/main/java">
|
||||||
|
<property name="enableSubPackages" value="true"/>
|
||||||
|
<property name="trimStrings" value="true"/>
|
||||||
|
</javaModelGenerator>
|
||||||
|
<sqlMapGenerator targetPackage="com.pxene.dsp.archer.dao" targetProject="src/main/java">
|
||||||
|
<property name="enableSubPackages" value="true"/>
|
||||||
|
</sqlMapGenerator>
|
||||||
|
<javaClientGenerator type="XMLMAPPER" targetPackage="com.pxene.dsp.archer.dao" targetProject="src/main/java">
|
||||||
|
<property name="enableSubPackages" value="true"/>
|
||||||
|
</javaClientGenerator>
|
||||||
|
|
||||||
|
<table tableName="dsp_t_ad_place_informationflow" domainObjectName="AdPlaceInformationFlowModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"></table>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
</generatorConfiguration>
|
Loading…
Reference in New Issue
Block a user