Spring boot + mybatis + oracle代码生成器
在pom文件中加入依赖:
<build>
<plugins>
<!--逆向工程-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>false</overwrite>
</configuration>
<dependencies>
<!--oracle-->
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>ojdbc6</artifactId>
<version>12.1.0.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
加入配置文件:
<?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> <context id="oraclegenerator" targetRuntime="MyBatis3Simple"> <commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator> <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@127.0.0.1:1521:orcl"
userId="scott"
password="root"/> <javaModelGenerator targetPackage="com.frost.entity" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator> <!--生成映射文件存放位置-->
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator> <javaClientGenerator targetPackage="com.frost.mapper" type="XMLMAPPER" targetProject="src/main/java">
<!-- 在targetPackage的基础上,根据数据库的schema再生成一层package,最终生成的类放在这个package下,默认为false -->
<property name="enableSubPackages" value="true"/>
</javaClientGenerator> <table tableName="STUDENT" />
</context>
</generatorConfiguration>
运行:

最后成功的标志为:

细节决定成败!

Spring boot + mybatis + oracle代码生成器的更多相关文章
- Spring boot + mybatis + mysql代码生成器
引入依赖: 在pom文件最下边: <build> <plugins> <!--逆向工程--> <plugin> <groupId>org.m ...
- spring boot+mybatis+swagger搭建
环境概述 使用的开发工具:idea 2018 3.4 环境:jdk1.8 数据库:MariaDB (10.2.21) 包管理:Maven 3.5 Web容器:Tomcat 8.0 开发机系统:Wind ...
- Spring boot Mybatis整合构建Rest服务(超细版)
Springboot+ Mybatis+MySql整合构建Rest服务(涵盖增.删.改.查) 1.概要 1.1 为什么要使用Spring boot? 1.1.1 简单方便.配置少.整合了大多数框架 ...
- Spring Boot + Mybatis 配置多数据源
Spring Boot + Mybatis 配置多数据源 Mybatis拦截器,字段名大写转小写 package com.sgcc.tysj.s.common.mybatis; import java ...
- 企业快速开发平台Spring Cloud+Spring Boot+Mybatis+ElementUI 实现前后端分离
鸿鹄云架构一系统管理平台 鸿鹄云架构[系统管理平台]使用J2EE技术来实施,是一个大型分布式的面向服务的JavaEE体系快速研发平台,基于模块化.服务化.原子化.热部署的设计思想,使用成熟领先的无商业 ...
- spring boot + mybatis + druid
因为在用到spring boot + mybatis的项目时候,经常发生访问接口卡,服务器项目用了几天就很卡的甚至不能访问的情况,而我们的项目和数据库都是好了,考虑到可能时数据库连接的问题,所以我打算 ...
- Spring Boot入门教程2-1、使用Spring Boot+MyBatis访问数据库(CURD)注解版
一.前言 什么是MyBatis?MyBatis是目前Java平台最为流行的ORM框架https://baike.baidu.com/item/MyBatis/2824918 本篇开发环境1.操作系统: ...
- spring boot + mybatis + druid配置实践
最近开始搭建spring boot工程,将自身实践分享出来,本文将讲述spring boot + mybatis + druid的配置方案. pom.xml需要引入mybatis 启动依赖: < ...
- spring boot+mybatis+quartz项目的搭建完整版
1. 利用spring boot提供的工具(http://start.spring.io/)自动生成一个标准的spring boot项目架构 2. 因为这里我们是搭建spring boot+mybat ...
随机推荐
- UI系统综述:iOS的图形绘制、动画与runloop
一.一条业务pipeline: 一个连接核心:coreanimation 二.两个进程: 1.app进程: 2.render进程: 首先,由 app 处理事件(Handle Events),如:用户的 ...
- PHP - assert()
Find and exploit the vulnerability to read the file .passwd.-------------查找并利用此漏洞读取文件.passwd. assert ...
- File upload - MIME type
Your goal is to hack this photo galery by uploading PHP code.Retrieve the validation password in the ...
- LeetCode 1110. Delete Nodes And Return Forest
原题链接在这里:https://leetcode.com/problems/delete-nodes-and-return-forest/ 题目: Given the root of a binary ...
- python函数 | 匿名函数lambda
匿名函数:lambda 表达式.普通函数有且只有返回值的函数才能用匿名函数进行简化成一行函数. 匿名函数不单独使用,一般和内置函数结合使用.内置函数中,可加入函数的有min.max.sorted.ma ...
- luoguP1742 最小圆覆盖
最小圆覆盖 首先 没错,我是个蒟蒻.luogu 流程 圆 C; for(i=1 to n) { if(P[i] 不在 C 内) { C = {P[i], 0}; for(j=1 to i-1) { i ...
- 【luoguP2994】[USACO10OCT]吃晚饭的时候Dinner Time
题目链接 按顺序对于每个座位找一个最近的同时编号最小的牛就行了 #include<iostream> #include<cstring> #include<cstdio& ...
- Docker原理及使用
虚拟化系统: 1. Type-I: 此种虚拟化是Hypervisor直接运行在硬件之上,来创建虚拟机. 2. Type-II: 这种虚拟化类似与VMware Workstations. IPC: 在相 ...
- [golang]数据库字典生成器-dataDictionary
dataDictionary 介绍 生成数据字典 应用场景 根据mysql数据库生成html格式数据字典,目前仅支持macos/linux/windows 使用步骤 运行程序 windows: dat ...
- 服务器负载过高问题分析-不是cpu高负载也不是IO负载如何处理(阿里 几乎是必考题)
关于top命令 经常问load average 参考:load average 定义(网易面试) jvm dump的使用 参考:Jvm dump jstack jmap jstat 介绍与使用(内存与 ...