Coder Social home page Coder Social logo

ssm's Introduction

简单的SSM框架,可以直接使用

ssm

spring-springMVC-myBatis3

执行建表脚本

DROP TABLE IF EXISTS user_t;

CREATE TABLE user_t ( id int(11) NOT NULL AUTO_INCREMENT, user_name varchar(40) NOT NULL, password varchar(255) NOT NULL, age int(4) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

/*Data for the table user_t */

insert into user_t(id,user_name,password,age) values (1,'测试','sfasgfaf',24);

使用MyBatis Generator自动创建代码

  1. 添加自动生成mybatis接口,实体类,和映射文件,三个价包git忽略文件被排除了,自己加上
  2. mybatis-generator-core-1.3.2.jar
  3. mysql-connector-java-5.1.38-bin.jar
  4. mybatis-3.3.0.jar
  5. 参考这篇博客:http://blog.csdn.net/zhshulin/article/details/23912615
  6. Java -jar mybatis-generator-core-1.3.2.jar -configfile generatorConfig.xml -overwrite
  7. 这样在生成之后,就可以在src目录下找到相应的文件夹,每个表格都会对应三个文件(实体类、接口、配置文件)。

mybatis3参考文档:

  1. (mybatis官方中文文档)-----------http://www.mybatis.org/mybatis-3/zh/index.html
  2. (mybatis-spring官方中文文档)--- http://www.mybatis.org/spring/zh/index.html
  3. (MyBatis相关工具)--------http://mybatis.tk/

ssm's People

Contributors

yangyangxu2016 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.