Skip to content

Commit

Permalink
细微修改
Browse files Browse the repository at this point in the history
  • Loading branch information
=ichenkaihua committed Dec 14, 2015
1 parent d9fded1 commit 06bf4e0
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 1 deletion.
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import groovy.sql.Sql;
group 'com.github.ichenkaihua'
version '1.0-SNAPSHOT'



apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'

apply plugin: 'org.akhikhl.gretty'
apply plugin: 'org.flywaydb.flyway'



//指定gradle wrapper版本
task wrapper(type: Wrapper) {
Expand All @@ -32,11 +37,29 @@ buildscript {

classpath 'org.akhikhl.gretty:gretty:1.2.4'
classpath: 'mysql:mysql-connector-java:5.1.36'
classpath "org.flywaydb:flyway-gradle-plugin:3.2.1"
}


}




flyway {
user = 'github'
url='jdbc:mysql://localhost:3306'
password = 'github-pass'
schemas = ['ssm-easy-template']
locations=["filesystem:${rootDir.path}/doc"]
/* placeholders = [
'keyABC': 'valueXYZ',
'otherplaceholder': 'value123'
]*/
}



//gretty设置
gretty {
port = 8080
Expand Down
54 changes: 54 additions & 0 deletions doc/V1_1__init_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*CREATE DATABASE IF NOT EXISTS `ssm_easy_template` *//*!40100 DEFAULT CHARACTER SET utf8 *//*;
USE `ssm_easy_template`;*/
-- MySQL dump 10.13 Distrib 5.5.44, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: ssm_easy_template
-- ------------------------------------------------------
-- Server version 5.5.44-0ubuntu0.14.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `user`
--

DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` char(40) DEFAULT NULL,
`password` char(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user`
--

LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'chenkaihua',NULL),(2,'test_user',NULL),(3,'陈开华','mypassword'),(6,'myname','mypass'),(7,'chenhua','chss');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2015-09-15 22:04:22
4 changes: 3 additions & 1 deletion src/main/resources/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@

<javaClientGenerator targetPackage="${mapperPackage}" targetProject="${src_main_java}" type="XMLMAPPER" />

<table tableName="%" >

<table tableName="%" >
<generatedKey column="id" sqlStatement="Mysql" identity="true"/>

</table>

</context>
Expand Down

0 comments on commit 06bf4e0

Please sign in to comment.