;Org.mybatis.generatorgroupId> Artifactid>Mybatis-generator-coreArtifactid> version>1.3.2version> Dependency> Dependencies>plugin>Where Generatorconfig.xml's position, we adjust according to the actual situationSecond, generatorconfig.xml configuration fileXML version= "1.0" encoding= "UTF-8"?>DOCTYPE generatorconfiguration Public "-//mybatis.org//dtd mybatis Generator Config
://dl.bintray.com/mybatis/mybatis-generator or local path of your choice (personal advice to download first, select Local installation, so fast, online installation is too slow)
5. Tick MyBatis Generator Click Next
6. After installation is complete, restart MyEclipse.
Second, the use of mybatisgenerator tools
1. Eclipse mode
1), new project, put the component and config.xml the configuration file to the co
please look for this genuine code, after-sales technology is guaranteed, the code has been continuously updated. (piracy is shameful, offenders must investigate) This is the company's team development --------------------------------------------------------------------------------------------------------------- ----------1. There are 4 sets of Oracle, MSYQL, spring3.0, spring4.0 all available without hitt
1. Required JAR PackageMybatis-generator-core-1.3.2.jar Mybatis-generator-core-1.3.2.jar can go http://mvnrepository.com/to search and download the corresponding version of the jar package.2. Configuring the Generator.xml FileXML version= "1.0" encoding= "UTF-8"?>DOCTYPE generatorconfiguration Public "-//mybatis.org//dtd mybatis Generator Configuration 1.0//en" "
jeecg-mybatis-framework versionBrief Description JEECG[J2EE Code Generation] is an intelligent development framework based on Java EE, which can save 50% of the work, realize code generation + manual Merge half Intelligent development code generation: According to the table to generate corresponding Bean,service, Dao,a
Mybatis-generator-gui-an interface tool for Automatic Generation of mybatis code, mybatisgeneratorgui
What is mybatis-generator-gui?
Before introducing mybatis-generator-gui, it is necessary to introduce what is mybatis generator (you can skip this section
Why should there be mybatis
MyBatis is a Java ORM framework, and ORM appears to simplify development. The initial development approach is to separate the business logic from the database query logic, either to write SQL statements in the program, or to invoke SQL stored procedures. This leads to the need to switch between language logic and SQL logic, resulting in inefficient development. So there is a series of ORM Framework, ORM Framework to the da
1 Dependency>2 groupId>Org.projectlombokgroupId>3 Artifactid>LombokArtifactid>4 version>1.18.0version>5 Scope>ProvidedScope>6 Dependency>7 add a dependency on the code generator -8 Dependency>9 groupId>Org.apache.velocitygroupId>Ten Artifactid>Velocity-engine-coreArtifactid> One version>2.0version> A Dependency>Development tools: STS code
A Code Generator ( development tool); B Ali database connection pool Druid; C security Permissions Framework Shiro The system is the mainstream springmvc+mybaits 3.2 version, which provides maven 's pom.xml file, plus free Hibernate version set (Collapse database) 1. There are 4 sets of Oracle, MSYQL, spring3.0, spring4.0 all provided without hitting the jar without encrypting the source
utilizationSet up your own set of UI will not be a short time, the fastest and most fast one dayThe company does not have less than 50 dollars an hour to add a class.4. Amateurs in the fun--------------------------------------------------------------------------------------------------------------- ----------Labor gains do not like to spray: Get ""The object is as followsLogin screen background with HTML5 special effects automatically switch (shutters, curtains and other switching modes)
The Automatic Generation of mybatis code is required in the past two days. Because mybatis is a semi-automatic ORM framework, the main task is to configure the mapping ing file, however, because handwritten ing files are prone to errors, you can use the mybatis generator to automatically generate object classes, Dao interfaces, and mapping ing files. This saves a lot of effort to copy the generated
JEECG (EE code Generation) is a code generator based intelligent development platform, with code generation + manual Merge semi-intelligent development model, can help to solve the Java project 60% duplication of work, so that the development of more attention to business lo
of Schema,eg:fase path under the current path Com.oop.eksp.user.model, True:com.oop.eksp.user.model. [SchemaName] - Propertyname= "Enablesubpackages"value= "false" /> Javaclientgenerator> Schema: Database name tableName: corresponding database table Domainobjectname: The entity class to be generated Enable*byexamp Le: Whether to generate the example class - TableSchema= "dayhr_db"TableName= "T_hr_sm_salschemabase"Domainobjectname= "Salschemabase"Enab
1. Create a folder named myibatisgen.
2. Download The mybatis-generator-core-1.3.1.jar or other jar packages to the myibatisgen folder.
3. Create the configuration file "generatorconfig. xml" for the generated code"
4. generate code
Java-jar mybatis-generator-core-1.3.1.jar-
Database reverse framework code generation tool: used by MyBatis Generator and mybatisgenerator
The IDEA reverse MyBatis project does not support built-in plug-ins like Hibernate, so you need to integrate a third-party MyBatis Generator.
Detailed introduction to http://mybatis.github.io/generator/index.html for MyBatis
These two days need to use the MyBatis code automatically generated functionality, because MyBatis belongs to a semi-automatic ORM framework, so the main task is to configure mapping mapping file, but because the handwriting map file is very error-prone, so you can use the MyBatis generator automatically generated entity classes, DAO interfaces, and mapping mapping files. This can save a lot of effort, cop
These two days need to use the MyBatis code automatically generated functionality, because MyBatis belongs to a semi-automatic ORM framework, so the main task is to configure mapping mapping file, but because the handwriting map file is very error-prone, you can use the MyBatis generator to automatically generate entity classes, DAO interface and mapping mapping file. This can save a lot of effort, copy the
)
Session. Close ();
}
Return RT;
}
If the where condition is complex, you can also customize the query condition. In the preceding example, androuteis (routename) is the custom query condition. You can
The specific internal class criteria of example custom query conditions:
Java code
Public criteria androuteis (string routename ){
Stringbuffer sb = new stringbuffer ("point_name in" +
"(Select
random number generator in Java: Random,threadlocalrandom,securerandomIn the articleThe Random is: Java.util.Random,Threadlocalrandom namely: Java.util.concurrent.ThreadLocalRandomSecureRandom namely: Java.security.SecureRandomis Q:random thread-safe?A:random is thread-safe, but may have low performance under multithreading.Reference:Http://docs.oracle.com/javase/7/docs/api/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.