LibrarySystem图书管理系统开发(一)

网友投稿 267 2023-02-01


LibrarySystem图书管理系统开发(一)

本文为大家分享了LibrarySystem图书管理系统开发的第一篇,供大家参考,具体内容如下

SSM搭建过程:

一般idea创建工程的过程

打开idea ---> File ---> new ---> project ---> maven --->

create from archetype ---> maven-archetype-webapp ---> 接下来一般默认即可

最后在main目录下新建java 和 resources 文件夹。

第一步:添加Spring、Spring MVC、Mybatis的依赖

都配有详细的说明,这里不再重复

pom.xml

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0

com.ray

LibrarySystem02

1.0-SNAPSHOT

war

LibrarySystem02 Maven Webapp

http://example.com

UTF-8

1.7

1.7

1.1.1

5.1.18

1.1.9

3.4.1

1.3.0

3.1.0

4.3.2.RELEASE

1.7.18

1.2.17

1.9.13

2.9.2

1.2.47

1.3.5

&LuElxDlt;!-- 单元测试 -->

junit

junit

4.11

test

ch.qos.logback

logback-classic

${logback.version}

mysql

mysql-connector-java

${mysql.version}

runtime

com.alibaba

druid

${com.alibaba.druid.version}

org.mybatis

mybatis

${com.mybatis.mybatis.version}

org.mybatis

mybatis-spring

${com.mybatis.mybatis_spring.version}

jstl

jstl

1.2

javax.servlet

javax.servlet-api

${javax.servlet.version}

org.springframework

spring-core

${org.springframework.version}

<dependency>

org.springframework

spring-beans

${org.springframework.version}

org.springframework

spring-context

${org.springframework.version}

org.springframework

spring-jdbc

${org.springframework.version}

org.springframework

spring-tx

${org.springframework.version}

org.springframework

spring-web

${org.springframework.version}

org.springframework

spring-webmvc

${org.springframework.version}

org.springframework

spring-test

${org.springframework.version}

org.codehaus.jackson

jackson-mapper-asl

${jackson-mapper-asl.version}

com.fasterxml.jackson.core

jackson-core

${jackson.version}

com.fasterxml.jackson.core

jackson-databind

${jackson.version}

com.alibaba

fastjson

${fastjson.version}

LibrarySystem02

maven-clean-plugin

3.0.0

maven-resources-plugin

3.0.2

maven-compiler-plugin

3.7.0

maven-surefire-plugin

2.20.1

maven-war-plugin

3.2.0

maven-install-plugin

2.5.2

maven-deploy-plugin

2.8.2

org.mybatis.generator

mybatis-generator-maven-plugin

${org.mybatis.generator.version}

true

true

org.mybatis

mybatis

${com.mybatis.mybatis.version}

mysql

mysql-connector-java

${mysql.version}

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0

com.ray

LibrarySystem02

1.0-SNAPSHOT

war

LibrarySystem02 Maven Webapp

http://example.com

UTF-8

1.7

1.7

1.1.1

5.1.18

1.1.9

3.4.1

1.3.0

3.1.0

4.3.2.RELEASE

1.7.18

1.2.17

1.9.13

2.9.2

1.2.47

1.3.5

&LuElxDlt;!-- 单元测试 -->

junit

junit

4.11

test

ch.qos.logback

logback-classic

${logback.version}

mysql

mysql-connector-java

${mysql.version}

runtime

com.alibaba

druid

${com.alibaba.druid.version}

org.mybatis

mybatis

${com.mybatis.mybatis.version}

org.mybatis

mybatis-spring

${com.mybatis.mybatis_spring.version}

jstl

jstl

1.2

javax.servlet

javax.servlet-api

${javax.servlet.version}

org.springframework

spring-core

${org.springframework.version}

<dependency>

org.springframework

spring-beans

${org.springframework.version}

org.springframework

spring-context

${org.springframework.version}

org.springframework

spring-jdbc

${org.springframework.version}

org.springframework

spring-tx

${org.springframework.version}

org.springframework

spring-web

${org.springframework.version}

org.springframework

spring-webmvc

${org.springframework.version}

org.springframework

spring-test

${org.springframework.version}

org.codehaus.jackson

jackson-mapper-asl

${jackson-mapper-asl.version}

com.fasterxml.jackson.core

jackson-core

${jackson.version}

com.fasterxml.jackson.core

jackson-databind

${jackson.version}

com.alibaba

fastjson

${fastjson.version}

LibrarySystem02

maven-clean-plugin

3.0.0

maven-resources-plugin

3.0.2

maven-compiler-plugin

3.7.0

maven-surefire-plugin

2.20.1

maven-war-plugin

3.2.0

maven-install-plugin

2.5.2

maven-deploy-plugin

2.8.2

org.mybatis.generator

mybatis-generator-maven-plugin

${org.mybatis.generator.version}

true

true

org.mybatis

mybatis

${com.mybatis.mybatis.version}

mysql

mysql-connector-java

${mysql.version}

第二步:添加数据库

这里需要创建一个数据库,名为:library

建表语句如下:

# Host: localhost (Version 6.0.11-alpha-community)

# Date: 2018-05-22 20:31:40

# Generator: MySQL-Front 6.0 (Build 2.20)

#

# Structure for table "book"

#

DROP TABLE IF EXISTS `book`;

CREATE TABLE `book` (

`id` bigint(20) NOT NULL AUTO_INCREMENT,

`book_name` varchar(255) NOT NULL,

`book_writer` varchar(255) NOT NULL,

`book_publisher` varchar(255) NOT NULL,

`book_isrent` bigint(20) NOT NULL,

`book_person` varchar(20) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

#

# Data for table "book"

#

INSERT INTO `book` VALUES (1,'机器学习','周志华','清华大学出版社',1,'linyue'),(2,'实战机器学习','Peter','人民邮电出版社',1,'linyue'),(4,'算法导论','Thomas','机械工业出版社',0,' ');

#

# Structure for table "user"

#

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (

`id` bigint(11) NOT NULL AUTO_INCREMENT,

`user_name` varchar(40) NOT NULL,

`user_email` varchar(50) NOT NULL,

`user_pwd` varchar(50) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

#

# Data for table "user"

#

INSERT INTO `user` VALUES (1,'linyue','123123@qq.com','123'),(3,'rain','222222@gmail.com','222'),(4,'ray','333333@qq.com','333'),(5,'test','123123@qq.com','123');

完整项目demo下载:LibrarySystem02


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:javaweb购物车案列学习开发
下一篇:怎么看java线程状态(怎么看java线程状态是否正常)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~