您好,登錄后才能下訂單哦!
小編給大家分享一下Mybatis-Plus代碼生成器的示例分析,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
創(chuàng)建一張商品表test_goods
CREATE TABLE `test_goods` ( `id` bigint(20) DEFAULT NULL COMMENT 'id', `goods_sn` varchar(45) DEFAULT NULL COMMENT '商品編碼', `name` varchar(255) DEFAULT NULL COMMENT '商品名稱', `title` varchar(80) DEFAULT NULL COMMENT '標(biāo)題', `price` decimal(10,2) DEFAULT NULL COMMENT '售價(jià)', `status` int(2) DEFAULT NULL COMMENT '商品狀態(tài)', `sale_count` int(11) DEFAULT NULL COMMENT '銷量', `create_date` datetime DEFAULT NULL COMMENT '創(chuàng)建時(shí)間', `modify_date` datetime DEFAULT NULL COMMENT '修改時(shí)間' ) ENGINE=InnoDB DEFAULT CHARSET=utf8
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> <version>2.1.4</version> </dependency> <!-- aspectj --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <scope>provided</scope> </dependency> <!--es--> <!-- lombok 簡化get/set 方法 --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.10</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <!--csv導(dǎo)出用到--> <dependency> <groupId>com.opencsv</groupId> <artifactId>opencsv</artifactId> <version>3.8</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency> </dependencies>
看完了這篇文章,相信你對“Mybatis-Plus代碼生成器的示例分析”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。