Comments (2)
pom.xml
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
</dependency>
</dependencies>
</plugin>
generatorConfig.xml
<context id="context1" targetRuntime="MyBatis3">
<!-- 抑制警告 -->
<property name="suppressTypeWarnings" value="true"/>
<!-- generate entity时,生成hashcode和equals方法 -->
<!-- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin" /> -->
<!-- generate entity时,生成serialVersionUID -->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
<!-- 这个插件只会增加字符串字段映射到一个JDBC字符的方法 -->
<plugin type="org.mybatis.generator.plugins.CaseInsensitiveLikePlugin"/>
<!-- genenat entity时,生成toString -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<commentGenerator>
<property name="suppressAllComments" value="true"/>
<property name="suppressDate" value="true"/>
</commentGenerator>
<!-- 数据库配置文件的url是不能直接拷贝过来用的,需要把&换成'&' -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/test?useUnicode=true&charaterEncoding=utf-8&allowMultiQueries=true"
userId="testuser" password="123456">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- generate Model -->
<javaModelGenerator targetPackage="main.generated.model"
targetProject="${project.build.directory}/../src/main/java/main/generated/mapper">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
<property name="isMergeable" value="false"/>
</javaModelGenerator>
<!-- generate xml -->
<sqlMapGenerator targetPackage="main.generated.mapper"
targetProject="${project.build.directory}/../src/main/java/main/generated/mapper">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- generate Mapper -->
<javaClientGenerator type="XMLMAPPER" targetPackage="main.generated.mapper"
targetProject="${project.build.directory}/../src/main/java/main/generated/mapper">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!--
catalog CDATA #IMPLIED
schema CDATA #IMPLIED
tableName CDATA #REQUIRED
alias CDATA #IMPLIED
domainObjectName CDATA #IMPLIED
enableInsert CDATA #IMPLIED
enableSelectByPrimaryKey CDATA #IMPLIED
enableUpdateByPrimaryKey CDATA #IMPLIED
enableDeleteByPrimaryKey CDATA #IMPLIED
enableCountByExample CDATA #IMPLIED
enableUpdateByExample CDATA #IMPLIED
enableDeleteByExample CDATA #IMPLIED
enableSelectByExample CDATA #IMPLIED
selectByExampleQueryId CDATA #IMPLIED
selectByPrimaryKeyQueryId CDATA #IMPLIED
modelType CDATA #IMPLIED
escapeWildcards CDATA #IMPLIED
delimitIdentifiers CDATA #IMPLIED
delimitAllColumns CDATA #IMPLIED
-->
<table schema="test" tableName="college" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="course" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="role" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="selectedcourse" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="student" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="teacher" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
<table schema="test" tableName="userlogin" modelType="flat"
enableCountByExample="true" enableUpdateByExample="true"
enableDeleteByExample="true" enableSelectByExample="true"
selectByExampleQueryId="true"/>
</context>
</generatorConfiguration>
from examination_system.
谢谢你
from examination_system.
Related Issues (20)
- 前台有很多错误id,不知道博主自己发现没有
- 解决一些bug和复合条件查询,完善一些逻辑问题入学生名字的唯一,地址如下!
- css显示不出来 HOT 1
- 您好 这个项目的访问路径是多少?
- 作者可以留下联系方式吗
- 以example结尾的po包中的类的作用
- 我运行登录后显示404,作者能留个联系方式讨教一下吗?加个star哦!
- 终于弄出来了,pom.xml文件中加一些东西。 HOT 14
- 两个报错信息求教 HOT 3
- 试了所有账户和密码都跳转到错误提示页面:没有该用户 HOT 4
- idea终于跑成功了 HOT 7
- 能大概说说这是怎么实现的吗?
- 3q分享 HOT 2
- 404 /login资源找不到
- 已全部弄通
- There is a cross site scripting vulnerability exists in Examination_System
- 可以运行啦 HOT 2
- 在IDEA中可以运行了! HOT 2
- 若提示登录超时、无此用户...
- idea运行成功了,但是登录跳转却404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examination_system.