Trick Houss ', (); Commit;select * from Filmtype;select * from Filminfo;Operating commands under Linux:Create DATABASE Cinema Character set Utf8;use cinema;source full path script file addressGenerator.xml fileTo modify the location, the path of the driver package, the path of the MySQL package, the configuration of the linked database, the path of the generated package, and the last comment on theFinally write a run script, create a bat suffix file under window, LINUB to create the sh suffix
The first way: Configure the Maven pluginThe new generatorconfig.xml content under Src/main/resources is as follows: Public "-//mybatis.org//dtd MyBatis Generator Configuration 1.0//en""Http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >Connectionurl= "Jdbc:mysql://127.0.0.1:3306/thinkphp?useunicode=trueamp;characterencoding=utf-8"Userid= "Root"password= "Root" >True to parse the JDBC DECIMAL and NUMERIC types into Java.math.BigDecimal-You can also use "MAVEN" to automatically generate th
= "Forcebigdecimals"value= "false"/> - Javatyperesolver> + Build the package name and location of the model - A JavamodelgeneratorTargetpackage= "Test.model"Targetproject= "C:\wangbo\"> at Propertyname= "Enablesubpackages"value= "true"/> - Propertyname= "Trimstrings"value= "true"/> - Javamodelgenerator> - Build the package name and location of the mapping file - - SqlmapgeneratorTargetpackage= "Test.mapping"Targetproject= "C:\wangbo\"> - Propertyname= "Enablesubpackages"value=
. The parameter is an object.parameter comments are: #{annotation name. Object Properties} | #{param[1..n]. Object Properties}Summarize:1. The role of annotation @param is to set parameter aliases. The set parameter can only be accessed by ' #{param[1..n ' or ' #{note alias} ' or #{annotation name. Object Properties} to access2. For multiple parameters, use the ' #{parameter position [0..n-1]} ' | ' #{param[1..n]} ' to access parametersThe test code is too messy to be posted.Parameters of interf
.
InsertUsegeneratekeys= "true" and keyproperty= "id" are used together to indicate that the ID is a self-growing field. Note: The parameter is a variable in userinfo, not a field in the databaseSql:This element can be used to define reusable SQL code snippets that can be included in other statements. It can be parameterized statically (in load parameters). Different attribute values are changed by the included instance. Like what:This SQL fragment can be included in other statements, f
= "Org.mybatis.spring.mapper.MapperScannerConfigurer">2 Propertyname= "Basepackage"value= "Com.xxx.xxx.dao.**.*" />3 Propertyname= "Sqlsessionfactorybeanname"value= "Sqlsessionfactory" />4 Bean>The value of Basepackage should be the name of the specified package and the file name I specified.Change to the following configuration, compile normal pass:1 Beanclass= "Org.mybatis.spring.mapper.MapperScannerConfigurer">2 Propertyname= "Basepackage"value= "Com.xxx.xxx.dao"
1: Give a @table annotation, give a default table name, do not write can also, but to hump turn underline match@Table (name = "Conf_default")2: Add non-table field parameters to accept dynamic Table name parameters@Transient//declaring non-database fieldsPrivate String TableName;3: Implement interface Idynamictablename, implement the following method, the property in 2 is the return table name Public String Getdynamictablename () { return tableName;}This is said in the source code:/**@author
The project uses the Spring boot1.5.2 integrated mybatis Generic Mapper plug-in to discover query methods Selectbyprimarykey
can cause an exception--java.lang.classcastexception:com.xxx.xxx.entity cannot be cast to com.xxx.xxx.entity
test: Insert, UPDATE, delete method is no problem, is the query out of the entity on the report of the exception. Later to GitHub see this is a bug in the plugin
The workaround is as follows:
Create a Meta-inf folde
the driver to the device number, you must first apply for the device number resource from the kernel. Only after the application is complete can you bind the device number to the driver.
How do I apply for a device number from the kernel?
Static and Dynamic Allocation
Static allocation
1> check which master
Reference Address: http://blog.chinaunix.net/uid-26322998-id-2981874.html1, Block equipmentDevices in the system that can randomly (and do not need to sequentially) access fixed-size data slices (chunks) are called block devices, which are called blocks. The most common block devices are hard disks, and in addition, there are many other block devices, such as floppy drives, CD-ROM drives, flash memory, and so on. Note that they are all used in a way that installs the file system -a common way fo
In the build process of the Linux platform Oracle RAC, if you use Asm+raw storage, because ASM does not support block devices and supports character access devices, you need to configure the conversion of block device drive to character device How drive is accessed.But in the Linux platform, unlike Aix and HP-UX, the default is to provide a block device correspon
devices in the Linux kernelFor the connection on the specific bus external devices have a struct device corresponding, such as platform equipment has platform_device corresponding to it, which platform_device structure is as follows: struct Platform_device {
const char * name; Device name to match the name of the driver and, if successful, into the driven probe function
int id;
struct
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.