修改登录界面

master
Allen 6 years ago
commit 6d88c8b687

@ -1,6 +1,7 @@
{ {
"pages": [ "pages": [
"shuji/shuji",
"denglu/denglu", "denglu/denglu",
"shouye/shouye", "shouye/shouye",
"chazhao/chazhao", "chazhao/chazhao",

@ -1,7 +1,11 @@
<form bindsubmit="formSubmit" > <form bindsubmit="formSubmit" >
<view class="container"> <view class="container">
<view class="login-icon"> <view class="login-icon">
<<<<<<< HEAD
<image class="login-img" src="../images/123.jpg"></image> <image class="login-img" src="../images/123.jpg"></image>
=======
<image class="login-img" src="../image/123.jpg"></image>
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
</view> </view>
<view class="login-from"> <view class="login-from">
@ -20,7 +24,11 @@
</view> </view>
<!--按钮--> <!--按钮-->
<view class="loginBtnView"> <view class="loginBtnView">
<<<<<<< HEAD
<button class="loginBtn" size="{{primarySize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button> <button class="loginBtn" size="{{primarySize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button>
=======
<button class="loginBtn" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="login" formType="submit">登录</button>
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
</view> </view>
</view> </view>
</view> </view>

@ -48,7 +48,11 @@ page{
text-align: right; text-align: right;
margin-right: 22px; margin-right: 22px;
margin-top: 11px; margin-top: 11px;
<<<<<<< HEAD
color: #cccccc; color: #cccccc;
=======
color: #000;
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
font-size: 14px font-size: 14px
} }
@ -62,7 +66,11 @@ page{
.loginBtnView { .loginBtnView {
width: 100%; width: 100%;
height: auto; height: auto;
<<<<<<< HEAD
background-color: rgb(253,253,65); background-color: rgb(253,253,65);
=======
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
margin-top: 0px; margin-top: 0px;
margin-bottom: 0px; margin-bottom: 0px;
padding-bottom: 0px; padding-bottom: 0px;
@ -71,4 +79,8 @@ page{
.loginBtn { .loginBtn {
width: 80%; width: 80%;
margin-top: 35px; margin-top: 35px;
<<<<<<< HEAD
=======
background-color:rgb(253, 153, 65);
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6
} }

@ -1,67 +1,67 @@
// 获取全局应用程序实例对象 // 获取全局应用程序实例对象
const app = getApp(); const app = getApp();
// 创建页面实例对象 // 创建页面实例对象
Page({ Page({
/** /**
* 页面名称 * 页面名称
*/ */
name: "index", name: "index",
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad () { onLoad() {
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady () { onReady() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow () { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide () { onHide() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload () { onUnload() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh () { onPullDownRefresh() {
}, },
//以下为自定义点击事件 //以下为自定义点击事件
}) })

@ -1,3 +1,3 @@
{ {
"usingComponents": {} "usingComponents": {}
} }

@ -0,0 +1,4 @@
<image class="wx-image_TCMtbw" mode="scaleToFill" src="//o3bnyc.creatby.com/diazo/images/image-placeholder.svg" style="background-size: 100% 100%; background-position: 0% 0%; background-repeat: no-repeat; background-image: url(http://o3bnyc.creatby.com/diazo/images/image-placeholder.svg);"/>
<text class="c-block wx-text_3ayXhS" > 姓名:</text>
<text class="c-block wx-text_cEEG0A" > 学号:</text>
<text class="c-block wx-text_lkXRAs" > 密码:</text>

@ -0,0 +1,73 @@
/* 基础样式 */
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page {
height: 100%;
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
}
checkbox-group,
radio-group{
display:block;
}
:before,
:after ,
::before,
::after{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.c-minheight {
min-height: 80px;
}
.c-full {
width: 100%;
height: 100%;
}
.c-block {
display: block;
}
.c-autosize {
width: auto;
height: auto;
}
.c-fullwidth {
width: 100%;
}
.c-fullheight {
height: 100%;
}
.c-initHide{
opacity:0 !important;
}
.c-ellipse{
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow:hidden;
}
/* 自定义样式 */
.wx-image_TCMtbw{transition: All 0s ease; transform: rotate(0deg) scale(0.5) translate(22%,0%); -ms-transform: rotate(0deg) scale(0.5) translate(22%,0%); -o-transform: rotate(0deg) scale(0.5) translate(22%,0%); -moz-transform: rotate(0deg) scale(0.5) translate(22%,0%); -webkit-transform: rotate(0deg) scale(0.5) translate(22%,0%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_3ayXhS{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; background-repeat: repeat; transform: rotate(0deg) scale(1.2) translate(0%, 0%); background-color: rgba(255,175,105,1); }
.wx-text_cEEG0A{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; transform: rotate(0deg) scale(1.2) translate(0%, 152%); background-color: rgba(255, 175, 105, 1); border-bottom-right-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-top-left-radius: 15px; }
.wx-text_lkXRAs{border-radius: 15px; transition: all; margin-right: 80px; margin-left: 100px; transform: rotate(0deg) scale(1.2) translate(0%, 304%); background-color: rgba(255, 175, 105, 1); border-bottom-right-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-top-left-radius: 15px; }

@ -1,66 +1,37 @@
// shuji/shuji.js /*onLoad: function () {
Page({ wx.request({
url: 'https://zhenxiang.xuanjis.com', //服务器地址
/** data: {
* 页面的初始数据 name: 'book_id'//请求参数
*/ },
data: { header: {
'content-type': 'application/json'
}, },
success: function (res) {
/** console.log(res.data)
* 生命周期函数--监听页面加载 }
*/ })
onLoad: function (options) { }
*/
}, Component({
/**
/** * 组件的属性列表
* 生命周期函数--监听页面初次渲染完成 */
*/ properties: {
onReady: function () {
},
},
/**
/** * 组件的初始数据
* 生命周期函数--监听页面显示 */
*/ data: {
onShow: function () {
},
},
/**
/** * 组件的方法列表
* 生命周期函数--监听页面隐藏 */
*/ methods: {
onHide: function () {
}
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })

@ -1,2 +1,4 @@
<!--shuji/shuji.wxml--> <view class="c-minheight wx-view_3ZhLNq" />
<text>shuji/shuji.wxml</text> <text class="c-block wx-text_efNLZY" >书名:</text>
<text class="c-block wx-text_07leZC" >书号:</text>
<text class="c-block wx-text_MWTyqb" >作者</text>

@ -1 +1,69 @@
/* shuji/shuji.wxss */ /* 基础样式 */
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page {
height: 100%;
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
}
checkbox-group,
radio-group{
display:block;
}
:before,
:after ,
::before,
::after{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.c-minheight {
min-height: 80px;
}
.c-full {
width: 100%;
height: 100%;
}
.c-block {
display: block;
}
.c-autosize {
width: auto;
height: auto;
}
.c-fullwidth {
width: 100%;
}
.c-fullheight {
height: 100%;
}
.c-initHide{
opacity:0 !important;
}
.c-ellipse{
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow:hidden;
}
/* 自定义样式 */
.wx-view_3ZhLNq{transition: All 0s ease; margin-right: 150px; margin-left: 150px; transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transform: rotate(0deg) scale(1.6) translate(0%,43%); -o-transform: rotate(0deg) scale(1.6) translate(0%,43%); -moz-transform: rotate(0deg) scale(1.6) translate(0%,43%); -webkit-transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_efNLZY{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,434%); -o-transform: rotate(0deg) scale(1.2) translate(0%,434%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,434%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_07leZC{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,543%); -o-transform: rotate(0deg) scale(1.2) translate(0%,543%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,543%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_MWTyqb{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,652%); -o-transform: rotate(0deg) scale(1.2) translate(0%,652%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,652%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }

@ -62,5 +62,10 @@ Page({
} }
} }
}) })
} },
gerenxinxisubmit: function (e) {
wx.navigateTo({
url: '../gerenxinxi/gerenxinxi',
})
}
}) })

@ -1,3 +0,0 @@
App({
})

@ -1,14 +0,0 @@
{
"debug": true,
"window": {
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#000000",
"navigationBarTitleText": "",
"backgroundColor": "#ffffff",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
},
"pages": [
"page/index/index"
]
}

@ -1,73 +0,0 @@
/* 基础样式 */
view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page {
height: 100%;
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
}
checkbox-group,
radio-group{
display:block;
}
:before,
:after ,
::before,
::after{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.c-minheight {
min-height: 80px;
}
.c-full {
width: 100%;
height: 100%;
}
.c-block {
display: block;
}
.c-autosize {
width: auto;
height: auto;
}
.c-fullwidth {
width: 100%;
}
.c-fullheight {
height: 100%;
}
.c-initHide{
opacity:0 !important;
}
.c-ellipse{
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow:hidden;
}
/* 自定义样式 */
.wx-view_3ZhLNq{transition: All 0s ease; margin-right: 150px; margin-left: 150px; transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transform: rotate(0deg) scale(1.6) translate(0%,43%); -o-transform: rotate(0deg) scale(1.6) translate(0%,43%); -moz-transform: rotate(0deg) scale(1.6) translate(0%,43%); -webkit-transform: rotate(0deg) scale(1.6) translate(0%,43%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_efNLZY{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,434%); -o-transform: rotate(0deg) scale(1.2) translate(0%,434%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,434%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,434%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_07leZC{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,543%); -o-transform: rotate(0deg) scale(1.2) translate(0%,543%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,543%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,543%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }
.wx-text_MWTyqb{transition: All 0s ease; margin-right: 80px; margin-left: 80px; transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transform: rotate(0deg) scale(1.2) translate(0%,652%); -o-transform: rotate(0deg) scale(1.2) translate(0%,652%); -moz-transform: rotate(0deg) scale(1.2) translate(0%,652%); -webkit-transform: rotate(0deg) scale(1.2) translate(0%,652%); -ms-transition: All 0s ease; -o-transition: All 0s ease; -moz-transition: All 0s ease; -webkit-transition: All 0s ease; }

Binary file not shown.

@ -1,14 +0,0 @@
onLoad: function () {
wx.request({
url: 'https://zhenxiang.xuanjis.com', //服务器地址
data: {
name: 'book_id'//请求参数
},
header: {
'content-type': 'application/json'
},
success: function (res) {
console.log(res.data)
}
})
}

@ -1,4 +0,0 @@
<view class="c-minheight wx-view_3ZhLNq" />
<text class="c-block wx-text_efNLZY" >书名:</text>
<text class="c-block wx-text_07leZC" >书号:</text>
<text class="c-block wx-text_MWTyqb" >作者</text>

@ -1 +0,0 @@
/* page/index/index.wxss */

@ -1,40 +0,0 @@
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false
},
"compileType": "miniprogram",
"libVersion": "2.5.0",
"appid": "wxb280d1925541c356",
"projectname": "7",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}

@ -1,5 +1,5 @@
<html> <html>
<body> <body>
<h2>Hello World!</h2> <h2>Hello World!</h2>
</body> </body>
</html> </html>

@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration> <generatorConfiguration>
<!-- JDBC数据库驱动jar文件 --> <!-- JDBC数据库驱动jar文件 -->
<classPathEntry location="H:\Maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" /> <classPathEntry location="H:\Maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" />
<context id="context1" defaultModelType="flat"> <context id="context1" defaultModelType="flat">
<!-- PO序列化 --> <!-- PO序列化 -->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"> <plugin type="org.mybatis.generator.plugins.SerializablePlugin">
</plugin> </plugin>
<commentGenerator> <commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 --> <!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="false" /> <property name="suppressAllComments" value="false" />
</commentGenerator> </commentGenerator>
<!-- 配置一个连接 --> <!-- 配置一个连接 -->
<jdbcConnection <jdbcConnection
driverClass="com.mysql.jdbc.Driver" driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/zx" connectionURL="jdbc:mysql://127.0.0.1:3306/zx"
userId="root" userId="root"
password="zxy19971014"> password="zxy19971014">
</jdbcConnection> </jdbcConnection>
<javaTypeResolver> <javaTypeResolver>
<property name="forceBigDecimals" value="false" /> <property name="forceBigDecimals" value="false" />
</javaTypeResolver> </javaTypeResolver>
<!--生成实体类存放位置 --> <!--生成实体类存放位置 -->
<javaModelGenerator targetPackage="edu.zx.domin" <javaModelGenerator targetPackage="edu.zx.domin"
targetProject="src/main/java"> targetProject="src/main/java">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</javaModelGenerator> </javaModelGenerator>
<!--生成映射文件存放位置 --> <!--生成映射文件存放位置 -->
<sqlMapGenerator targetPackage="mapper" <sqlMapGenerator targetPackage="mapper"
targetProject="src/main/resources"> targetProject="src/main/resources">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</sqlMapGenerator> </sqlMapGenerator>
<!--生成Mapper接口存放位置 --> <!--生成Mapper接口存放位置 -->
<javaClientGenerator targetPackage="edu.peter.mapper" <javaClientGenerator targetPackage="edu.peter.mapper"
targetProject="src/main/java" type="XMLMAPPER" /> targetProject="src/main/java" type="XMLMAPPER" />
<table schema="hunnu" tableName="goods_type" enableCountByExample="false" <table schema="hunnu" tableName="goods_type" enableCountByExample="false"
enableUpdateByExample="false" enableDeleteByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"> enableSelectByExample="false" selectByExampleQueryId="false">
</table> </table>
<table schema="hunnu" tableName="goods" enableCountByExample="false" <table schema="hunnu" tableName="goods" enableCountByExample="false"
enableUpdateByExample="false" enableDeleteByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"> enableSelectByExample="false" selectByExampleQueryId="false">
</table> </table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd"> "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <configuration>
</configuration> </configuration>

@ -1,51 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
<!-- 整合MyBatis 开始 --> <!-- 整合MyBatis 开始 -->
<!--创建jdbc数据源 --> <!--创建jdbc数据源 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="username" value="root" /> <property name="username" value="root" />
<property name="password" value="zxy19971014" /> <property name="password" value="zxy19971014" />
<property name="url" <property name="url"
value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" /> value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" />
</bean> </bean>
<!-- 配置MyBatis的sqlSession --> <!-- 配置MyBatis的sqlSession -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:mybatis.xml" /> <property name="configLocation" value="classpath:mybatis.xml" />
<property name="mapperLocations" value="classpath:mapper/*.xml" /> <property name="mapperLocations" value="classpath:mapper/*.xml" />
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
<!-- 加载分页插件 --> <!-- 加载分页插件 -->
<property name="plugins"> <property name="plugins">
<array> <array>
<bean class="com.github.pagehelper.PageHelper"> <bean class="com.github.pagehelper.PageHelper">
<property name="properties"> <property name="properties">
<value> <value>
dialect=mysql dialect=mysql
reasonable=true reasonable=true
</value> </value>
</property> </property>
</bean> </bean>
</array> </array>
</property> </property>
</bean> </bean>
<!-- 映射Mapper目录 --> <!-- 映射Mapper目录 -->
<!-- Mapper接口所在包名Spring会自动查找其下的Mapper --> <!-- Mapper接口所在包名Spring会自动查找其下的Mapper -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="edu.zx.mapper" /> <property name="basePackage" value="edu.zx.mapper" />
</bean> </bean>
<!-- 可通过注解控制事务 --> <!-- 可通过注解控制事务 -->
<tx:annotation-driven transaction-manager="transactionManager" /> <tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager" <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
</bean> </bean>
<!-- 整合MyBatis 结束 --> <!-- 整合MyBatis 结束 -->
</beans> </beans>

@ -1,5 +1,5 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Built-By: yuanhangpc Built-By: yuanhangpc
Build-Jdk: 1.8.0_152 Build-Jdk: 1.8.0_152
Created-By: Maven Integration for Eclipse Created-By: Maven Integration for Eclipse

@ -1,7 +1,7 @@
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Wed Jan 09 17:07:46 CST 2019 #Wed Jan 09 17:07:46 CST 2019
version=0.0.1-SNAPSHOT version=0.0.1-SNAPSHOT
groupId=edu.zxts groupId=edu.zxts
m2e.projectName=booksService m2e.projectName=booksService
m2e.projectLocation=H\:\\sts-bundle\\booksSearch\\booksService m2e.projectLocation=H\:\\sts-bundle\\booksSearch\\booksService
artifactId=booksService artifactId=booksService

@ -1,160 +1,160 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>edu.zxts</groupId> <groupId>edu.zxts</groupId>
<artifactId>booksSearch</artifactId> <artifactId>booksSearch</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<groupId>edu.zxts</groupId> <groupId>edu.zxts</groupId>
<artifactId>booksService</artifactId> <artifactId>booksService</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<name>booksService Maven Webapp</name> <name>booksService Maven Webapp</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<!-- Generic properties --> <!-- Generic properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Spring --> <!-- Spring -->
<spring.version>4.3.10.RELEASE</spring.version> <spring.version>4.3.10.RELEASE</spring.version>
</properties> </properties>
<dependencies> <dependencies>
<!-- mysql数据库驱动类 --> <!-- mysql数据库驱动类 -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version> <version>5.1.46</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- 导入MyBatis生成器 --> <!-- 导入MyBatis生成器 -->
<dependency> <dependency>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId> <artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version> <version>1.3.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version> <version>5.1.46</version>
</dependency> </dependency>
<!-- Spring --> <!-- Spring -->
<!-- 1)包含Spring 框架基本的核心工具类。Spring 其它组件要都要使用到这个包里的类, <!-- 1)包含Spring 框架基本的核心工具类。Spring 其它组件要都要使用到这个包里的类,
是其它组件的基本核心 --> 是其它组件的基本核心 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-core</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 2)这个jar 文件是所有应用都要用到的它包含访问配置文件、创建和管理bean 以及进行Inversion of Control <!-- 2)这个jar 文件是所有应用都要用到的它包含访问配置文件、创建和管理bean 以及进行Inversion of Control
/ Dependency InjectionIoC/DI操作相关的所有类。如果应用只需基本的IoC/DI 支持引入spring-core.jar / Dependency InjectionIoC/DI操作相关的所有类。如果应用只需基本的IoC/DI 支持引入spring-core.jar
及spring-beans.jar 文件就可以了。 --> 及spring-beans.jar 文件就可以了。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId> <artifactId>spring-beans</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 3)这个jar 文件为Spring 核心提供了大量扩展。可以找到使用Spring ApplicationContext特性时所需的全部类JDNI <!-- 3)这个jar 文件为Spring 核心提供了大量扩展。可以找到使用Spring ApplicationContext特性时所需的全部类JDNI
所需的全部类instrumentation组件以及校验Validation 方面的相关类。 --> 所需的全部类instrumentation组件以及校验Validation 方面的相关类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 4) 这个jar 文件包含对Spring 对JDBC 数据访问进行封装的所有类。 --> <!-- 4) 这个jar 文件包含对Spring 对JDBC 数据访问进行封装的所有类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId> <artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 5) 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事务管理。 --> <!-- 5) 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事务管理。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId> <artifactId>spring-tx</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 6)Spring web 包含Web应用开发时用到Spring框架时所需的核心类包括自动载入WebApplicationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量工具辅助类。 --> <!-- 6)Spring web 包含Web应用开发时用到Spring框架时所需的核心类包括自动载入WebApplicationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量工具辅助类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId> <artifactId>spring-web</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 7)包含SpringMVC框架相关的所有类。 --> <!-- 7)包含SpringMVC框架相关的所有类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId> <artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 8)Spring test 对JUNIT等测试框架的简单封装 --> <!-- 8)Spring test 对JUNIT等测试框架的简单封装 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- DAO: MyBatis --> <!-- DAO: MyBatis -->
<dependency> <dependency>
<groupId>org.mybatis</groupId> <groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId> <artifactId>mybatis</artifactId>
<version>3.4.2</version> <version>3.4.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mybatis</groupId> <groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId> <artifactId>mybatis-spring</artifactId>
<version>1.3.1</version> <version>1.3.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>c3p0</groupId> <groupId>c3p0</groupId>
<artifactId>c3p0</artifactId> <artifactId>c3p0</artifactId>
<version>0.9.1.2</version> <version>0.9.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-dbcp</groupId> <groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId> <artifactId>commons-dbcp</artifactId>
<version>1.4</version> <version>1.4</version>
</dependency> </dependency>
<!-- 单元测试 --> <!-- 单元测试 -->
<!-- https://mvnrepository.com/artifact/junit/junit --> <!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>booksService</finalName> <finalName>booksService</finalName>
<plugins><!--插件--> <plugins><!--插件-->
<!-- 配置JDK插件 --> <!-- 配置JDK插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<encoding>UTF8</encoding> <encoding>UTF8</encoding>
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<!-- 配置MyBatis生成器插件 --> <!-- 配置MyBatis生成器插件 -->
<plugin> <plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version> <version>1.3.5</version>
<configuration> <configuration>
<!--配置文件的路径 --> <!--配置文件的路径 -->
<configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile> <configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite> <overwrite>true</overwrite>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

@ -1,10 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>edu.zxts</groupId> <groupId>edu.zxts</groupId>
<artifactId>booksSearch</artifactId> <artifactId>booksSearch</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>booksService</module> <module>booksService</module>
</modules> </modules>
</project> </project>

@ -1,25 +1,25 @@
/target/ /target/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
### STS ### ### STS ###
.apt_generated .apt_generated
.classpath .classpath
.factorypath .factorypath
.project .project
.settings .settings
.springBeans .springBeans
.sts4-cache .sts4-cache
### IntelliJ IDEA ### ### IntelliJ IDEA ###
.idea .idea
*.iws *.iws
*.iml *.iml
*.ipr *.ipr
### NetBeans ### ### NetBeans ###
/nbproject/private/ /nbproject/private/
/build/ /build/
/nbbuild/ /nbbuild/
/dist/ /dist/
/nbdist/ /nbdist/
/.nb-gradle/ /.nb-gradle/

@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip

@ -1,286 +1,286 @@
#!/bin/sh #!/bin/sh
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file # or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information # distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file # regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the # to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance # "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at # with the License. You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, # Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an # software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the # KIND, either express or implied. See the License for the
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Maven2 Start Up Batch script # Maven2 Start Up Batch script
# #
# Required ENV vars: # Required ENV vars:
# ------------------ # ------------------
# JAVA_HOME - location of a JDK home dir # JAVA_HOME - location of a JDK home dir
# #
# Optional ENV vars # Optional ENV vars
# ----------------- # -----------------
# M2_HOME - location of maven2's installed home dir # M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven # MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use # e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc . /etc/mavenrc
fi fi
if [ -f "$HOME/.mavenrc" ] ; then if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc" . "$HOME/.mavenrc"
fi fi
fi fi
# OS specific support. $var _must_ be set to either true or false. # OS specific support. $var _must_ be set to either true or false.
cygwin=false; cygwin=false;
darwin=false; darwin=false;
mingw=false mingw=false
case "`uname`" in case "`uname`" in
CYGWIN*) cygwin=true ;; CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;; MINGW*) mingw=true;;
Darwin*) darwin=true Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`" export JAVA_HOME="`/usr/libexec/java_home`"
else else
export JAVA_HOME="/Library/Java/Home" export JAVA_HOME="/Library/Java/Home"
fi fi
fi fi
;; ;;
esac esac
if [ -z "$JAVA_HOME" ] ; then if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home` JAVA_HOME=`java-config --jre-home`
fi fi
fi fi
if [ -z "$M2_HOME" ] ; then if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home ## resolve links - $0 may be a link to maven's home
PRG="$0" PRG="$0"
# need this for relative symlinks # need this for relative symlinks
while [ -h "$PRG" ] ; do while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"` ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'` link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then if expr "$link" : '/.*' > /dev/null; then
PRG="$link" PRG="$link"
else else
PRG="`dirname "$PRG"`/$link" PRG="`dirname "$PRG"`/$link"
fi fi
done done
saveddir=`pwd` saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/.. M2_HOME=`dirname "$PRG"`/..
# make it fully qualified # make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd` M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir" cd "$saveddir"
# echo Using m2 at $M2_HOME # echo Using m2 at $M2_HOME
fi fi
# For Cygwin, ensure paths are in UNIX format before anything is touched # For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then if $cygwin ; then
[ -n "$M2_HOME" ] && [ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"` M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] && [ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"` JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] && [ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"` CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi fi
# For Mingw, ensure paths are in UNIX format before anything is touched # For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then if $mingw ; then
[ -n "$M2_HOME" ] && [ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`" M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] && [ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath? # TODO classpath?
fi fi
if [ -z "$JAVA_HOME" ]; then if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`" javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10. # readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink` readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`" javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else else
javaExecutable="`readlink -f \"$javaExecutable\"`" javaExecutable="`readlink -f \"$javaExecutable\"`"
fi fi
javaHome="`dirname \"$javaExecutable\"`" javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'` javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome" JAVA_HOME="$javaHome"
export JAVA_HOME export JAVA_HOME
fi fi
fi fi
fi fi
if [ -z "$JAVACMD" ] ; then if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD="$JAVA_HOME/jre/sh/java"
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD="$JAVA_HOME/bin/java"
fi fi
else else
JAVACMD="`which java`" JAVACMD="`which java`"
fi fi
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2 echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2 echo " We cannot execute $JAVACMD" >&2
exit 1 exit 1
fi fi
if [ -z "$JAVA_HOME" ] ; then if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set." echo "Warning: JAVA_HOME environment variable is not set."
fi fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root # traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory # first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() { find_maven_basedir() {
if [ -z "$1" ] if [ -z "$1" ]
then then
echo "Path not specified to find_maven_basedir" echo "Path not specified to find_maven_basedir"
return 1 return 1
fi fi
basedir="$1" basedir="$1"
wdir="$1" wdir="$1"
while [ "$wdir" != '/' ] ; do while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir basedir=$wdir
break break
fi fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc) # workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd` wdir=`cd "$wdir/.."; pwd`
fi fi
# end of workaround # end of workaround
done done
echo "${basedir}" echo "${basedir}"
} }
# concatenates all lines of a file # concatenates all lines of a file
concat_lines() { concat_lines() {
if [ -f "$1" ]; then if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")" echo "$(tr -s '\n' ' ' < "$1")"
fi fi
} }
BASE_DIR=`find_maven_basedir "$(pwd)"` BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then if [ -z "$BASE_DIR" ]; then
exit 1; exit 1;
fi fi
########################################################################################## ##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data. # This allows using the maven wrapper in projects that prohibit checking in binary data.
########################################################################################## ##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar" echo "Found .mvn/wrapper/maven-wrapper.jar"
fi fi
else else
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi fi
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
while IFS="=" read key value; do while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;; case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl" echo "Downloading from: $jarUrl"
fi fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if command -v wget > /dev/null; then if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget" echo "Found wget ... using wget"
fi fi
wget "$jarUrl" -O "$wrapperJarPath" wget "$jarUrl" -O "$wrapperJarPath"
elif command -v curl > /dev/null; then elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl" echo "Found curl ... using curl"
fi fi
curl -o "$wrapperJarPath" "$jarUrl" curl -o "$wrapperJarPath" "$jarUrl"
else else
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download" echo "Falling back to using Java to download"
fi fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
if [ -e "$javaClass" ]; then if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..." echo " - Compiling MavenWrapperDownloader.java ..."
fi fi
# Compiling the Java class # Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass") ("$JAVA_HOME/bin/javac" "$javaClass")
fi fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader # Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..." echo " - Running MavenWrapperDownloader.java ..."
fi fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi fi
fi fi
fi fi
fi fi
########################################################################################## ##########################################################################################
# End of extension # End of extension
########################################################################################## ##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR echo $MAVEN_PROJECTBASEDIR
fi fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java # For Cygwin, switch paths to Windows format before running java
if $cygwin; then if $cygwin; then
[ -n "$M2_HOME" ] && [ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"` M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] && [ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] && [ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] && [ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi fi
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \ exec "$JAVACMD" \
$MAVEN_OPTS \ $MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

@ -1,161 +1,161 @@
@REM ---------------------------------------------------------------------------- @REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one @REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file @REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information @REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file @REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the @REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance @REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at @REM with the License. You may obtain a copy of the License at
@REM @REM
@REM http://www.apache.org/licenses/LICENSE-2.0 @REM http://www.apache.org/licenses/LICENSE-2.0
@REM @REM
@REM Unless required by applicable law or agreed to in writing, @REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an @REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the @REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations @REM specific language governing permissions and limitations
@REM under the License. @REM under the License.
@REM ---------------------------------------------------------------------------- @REM ----------------------------------------------------------------------------
@REM ---------------------------------------------------------------------------- @REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script @REM Maven2 Start Up Batch script
@REM @REM
@REM Required ENV vars: @REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir @REM JAVA_HOME - location of a JDK home dir
@REM @REM
@REM Optional ENV vars @REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir @REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use @REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ---------------------------------------------------------------------------- @REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off @echo off
@REM set title of command window @REM set title of command window
title %0 title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME @REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one @REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending @REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre :skipRcPre
@setlocal @setlocal
set ERROR_CODE=0 set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal @REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal @setlocal
@REM ==== START VALIDATION ==== @REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome if not "%JAVA_HOME%" == "" goto OkJHome
echo. echo.
echo Error: JAVA_HOME not found in your environment. >&2 echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2 echo location of your Java installation. >&2
echo. echo.
goto error goto error
:OkJHome :OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init if exist "%JAVA_HOME%\bin\java.exe" goto init
echo. echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2 echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2 echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2 echo location of your Java installation. >&2
echo. echo.
goto error goto error
@REM ==== END VALIDATION ==== @REM ==== END VALIDATION ====
:init :init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". @REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found. @REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD% set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR% set WDIR=%EXEC_DIR%
:findBaseDir :findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd .. cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD% set WDIR=%CD%
goto findBaseDir goto findBaseDir
:baseDirFound :baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR% set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%" cd "%EXEC_DIR%"
goto endDetectBaseDir goto endDetectBaseDir
:baseDirNotFound :baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%" cd "%EXEC_DIR%"
:endDetectBaseDir :endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion @setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig :endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
) )
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. @REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% ( if exist %WRAPPER_JAR% (
echo Found %WRAPPER_JAR% echo Found %WRAPPER_JAR%
) else ( ) else (
echo Couldn't find %WRAPPER_JAR%, downloading it ... echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL% echo Downloading from: %DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
echo Finished downloading %WRAPPER_JAR% echo Finished downloading %WRAPPER_JAR%
) )
@REM End of extension @REM End of extension
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error if ERRORLEVEL 1 goto error
goto end goto end
:error :error
set ERROR_CODE=1 set ERROR_CODE=1
:end :end
@endlocal & set ERROR_CODE=%ERROR_CODE% @endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending @REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost :skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE% exit /B %ERROR_CODE%

@ -1,104 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version> <version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>com.example</groupId> <groupId>com.example</groupId>
<artifactId>demo</artifactId> <artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>demo</name> <name>demo</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<optional>true</optional><!-- 这个需要为 true 热部署才有效 --> <optional>true</optional><!-- 这个需要为 true 热部署才有效 -->
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.2</version> <version>1.18.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
<version>2.4</version> <version>2.4</version>
<classifier>jdk15</classifier> <classifier>jdk15</classifier>
</dependency> </dependency>
<!-- mysql --> <!-- mysql -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>8.0.13</version> <version>8.0.13</version>
</dependency> </dependency>
<!-- mybatis --> <!-- mybatis -->
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<!-- servlet --> <!-- servlet -->
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version> <version>3.0.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId> <artifactId>jstl</artifactId>
<version>1.2</version> <version>1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.37</version> <version>1.2.37</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<encoding>UTF8</encoding> <encoding>UTF8</encoding>
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

@ -1,14 +1,14 @@
package com.example.demo.Dao; package com.example.demo.Dao;
import com.example.demo.bean.book; import com.example.demo.bean.book;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
public interface bookMapper { public interface bookMapper {
@Select("select * from book where book_name = #{book_name}") @Select("select * from book where book_name = #{book_name}")
public book selectBookBybook_name(String book_name); public book selectBookBybook_name(String book_name);
@Select("select * from book where book_id = #{book_id}") @Select("select * from book where book_id = #{book_id}")
public book selectBookBybook_id(long book_id); public book selectBookBybook_id(long book_id);
@Select("select * from book") @Select("select * from book")
public List<book> select(); public List<book> select();
} }

@ -1,25 +1,25 @@
package com.example.demo.Dao; package com.example.demo.Dao;
import com.example.demo.bean.book; import com.example.demo.bean.book;
import com.example.demo.bean.borrowrecord; import com.example.demo.bean.borrowrecord;
import com.example.demo.bean.student; import com.example.demo.bean.student;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
public interface borrowrecordMapper { public interface borrowrecordMapper {
@Select("select * from book where book_name = #{book_name}") @Select("select * from book where book_name = #{book_name}")
public book selectBookBybook_name(String book_name); public book selectBookBybook_name(String book_name);
@Select("select * from student where s_id = #{s_id}") @Select("select * from student where s_id = #{s_id}")
public student selectStudentBys__id(long s_id); public student selectStudentBys__id(long s_id);
@Select("select * from book where book_id = #{book_id}") @Select("select * from book where book_id = #{book_id}")
public book selectBookBybook_id(long book_id); public book selectBookBybook_id(long book_id);
@Select("select * from student where s_name = #{s_name}") @Select("select * from student where s_name = #{s_name}")
public student selectBookBys_name(String s_name); public student selectBookBys_name(String s_name);
@Select("select * from borroerecord where borrowtime = #{borrowtime}") @Select("select * from borroerecord where borrowtime = #{borrowtime}")
public borrowrecord selectborrowrecordByborrowtime(String borrowtime); public borrowrecord selectborrowrecordByborrowtime(String borrowtime);
@Select("select * from borroerecord where senttime = #{senttime}") @Select("select * from borroerecord where senttime = #{senttime}")
public borrowrecord selectborrowrecordBysenttime(String senttime); public borrowrecord selectborrowrecordBysenttime(String senttime);
@Select("select * from borrowrecord") @Select("select * from borrowrecord")
public List<borrowrecord> select(); public List<borrowrecord> select();
} }

@ -1,12 +1,12 @@
package com.example.demo.Dao; package com.example.demo.Dao;
import com.example.demo.bean.student; import com.example.demo.bean.student;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
public interface studentMapper{ public interface studentMapper{
@Select("select * from student where s_id = #{s_id}") @Select("select * from student where s_id = #{s_id}")
public student selectAudioByS_id(long s_id); public student selectAudioByS_id(long s_id);
@Select("select * from student") @Select("select * from student")
public List<student> select(); public List<student> select();
} }

@ -1,14 +1,14 @@
package com.example.demo; package com.example.demo;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class DemoApplication { public class DemoApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args); SpringApplication.run(DemoApplication.class, args);
} }
} }

@ -1,21 +1,21 @@
package com.example.demo.bean; package com.example.demo.bean;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
@Getter @Getter
@Setter @Setter
@Entity @Entity
public class book { public class book {
@GeneratedValue(strategy=GenerationType.AUTO) @GeneratedValue(strategy=GenerationType.AUTO)
private long book_id; private long book_id;
private String book_name; private String book_name;
private String book_author; private String book_author;
private String book_sort; private String book_sort;
private int book_num; private int book_num;
public book(){}; public book(){};
} }

@ -1,22 +1,22 @@
package com.example.demo.bean; package com.example.demo.bean;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
@Getter @Getter
@Setter @Setter
@Entity @Entity
public class borrowrecord { public class borrowrecord {
@GeneratedValue(strategy=GenerationType.AUTO) @GeneratedValue(strategy=GenerationType.AUTO)
private long s_id; private long s_id;
private long book_id; private long book_id;
private String s_name; private String s_name;
private String book_name; private String book_name;
private String borrowtime; private String borrowtime;
private String senttime; private String senttime;
public borrowrecord(){}; public borrowrecord(){};
} }

@ -1,19 +1,19 @@
package com.example.demo.bean; package com.example.demo.bean;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
@Getter @Getter
@Setter @Setter
@Entity @Entity
public class student { public class student {
@GeneratedValue(strategy=GenerationType.AUTO) @GeneratedValue(strategy=GenerationType.AUTO)
private long s_id; private long s_id;
private String s_name; private String s_name;
private String s_password; private String s_password;
public student() {}; public student() {};
} }

@ -1,9 +1,9 @@
package com.example.demo.searchservice.controller; package com.example.demo.searchservice.controller;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
@Controller @Controller
public class searchservicecontroller extends HttpServlet { public class searchservicecontroller extends HttpServlet {
} }

@ -1,7 +1,7 @@
package com.example.demo.searchservice.service; package com.example.demo.searchservice.service;
import com.example.demo.bean.book; import com.example.demo.bean.book;
import java.util.List; import java.util.List;
public interface searchservice{ public interface searchservice{
List<book> findByNameLike(String book_name); List<book> findByNameLike(String book_name);
List<book> findByIdLike(long book_id); List<book> findByIdLike(long book_id);
} }

@ -1,7 +1,7 @@
datasource: datasource:
url: jdbc:mysql://localhost:3306/zx?useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://localhost:3306/zx?useUnicode=true&characterEncoding=utf8
username: root username: root
password: jin187 password: jin187
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
mybatis: mybatis:
type-aliases-package: com.example.demo.Dao type-aliases-package: com.example.demo.Dao

@ -1,17 +1,17 @@
package com.example.demo; package com.example.demo;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest
public class DemoApplicationTests { public class DemoApplicationTests {
@Test @Test
public void contextLoads() { public void contextLoads() {
} }
} }

@ -1,106 +1,106 @@
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
-- --
-- Host: localhost Database: 真香 -- Host: localhost Database: 真香
-- ------------------------------------------------------ -- ------------------------------------------------------
-- Server version 8.0.13 -- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8 ; SET NAMES utf8 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */; /*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_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' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- --
-- Table structure for table `book` -- Table structure for table `book`
-- --
DROP TABLE IF EXISTS `book`; DROP TABLE IF EXISTS `book`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8 ; SET character_set_client = utf8 ;
CREATE TABLE `book` ( CREATE TABLE `book` (
`book_id` int(20) NOT NULL, `book_id` int(20) NOT NULL,
`book_name` varchar(45) NOT NULL, `book_name` varchar(45) NOT NULL,
`author` varchar(20) NOT NULL, `author` varchar(20) NOT NULL,
`book_sort` varchar(20) NOT NULL, `book_sort` varchar(20) NOT NULL,
`book_num` int(5) NOT NULL, `book_num` int(5) NOT NULL,
PRIMARY KEY (`book_id`,`book_name`) PRIMARY KEY (`book_id`,`book_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `book` -- Dumping data for table `book`
-- --
LOCK TABLES `book` WRITE; LOCK TABLES `book` WRITE;
/*!40000 ALTER TABLE `book` DISABLE KEYS */; /*!40000 ALTER TABLE `book` DISABLE KEYS */;
INSERT INTO `book` VALUES (1,'软件综合实践二','王胜春','实践类',0),(2,'软件工程','张锦','理论类',0),(3,'CSAPP','窦亚玲','理论类',0),(4,'系统分析与设计','蒋少华','理论类',0),(5,'编译原理','肖伟','理论类',0),(6,'网络安全','王六平','理论类',0); INSERT INTO `book` VALUES (1,'软件综合实践二','王胜春','实践类',0),(2,'软件工程','张锦','理论类',0),(3,'CSAPP','窦亚玲','理论类',0),(4,'系统分析与设计','蒋少华','理论类',0),(5,'编译原理','肖伟','理论类',0),(6,'网络安全','王六平','理论类',0);
/*!40000 ALTER TABLE `book` ENABLE KEYS */; /*!40000 ALTER TABLE `book` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Table structure for table `borrowrecord` -- Table structure for table `borrowrecord`
-- --
DROP TABLE IF EXISTS `borrowrecord`; DROP TABLE IF EXISTS `borrowrecord`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8; SET character_set_client = utf8;
CREATE TABLE `borrowrecord` ( CREATE TABLE `borrowrecord` (
`s_id` int(20) NOT NULL, `s_id` int(20) NOT NULL,
`book_id` int(20) NOT NULL, `book_id` int(20) NOT NULL,
`s_name` varchar(20) NOT NULL, `s_name` varchar(20) NOT NULL,
`book_name` varchar(20) NOT NULL, `book_name` varchar(20) NOT NULL,
`borrowtime` varchar(45) NOT NULL, `borrowtime` varchar(45) NOT NULL,
`senttime` varchar(45) NOT NULL, `senttime` varchar(45) NOT NULL,
PRIMARY KEY (`s_id`) PRIMARY KEY (`s_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `borrowrecord` -- Dumping data for table `borrowrecord`
-- --
LOCK TABLES `borrowrecord` WRITE; LOCK TABLES `borrowrecord` WRITE;
/*!40000 ALTER TABLE `borrowrecord` DISABLE KEYS */; /*!40000 ALTER TABLE `borrowrecord` DISABLE KEYS */;
/*!40000 ALTER TABLE `borrowrecord` ENABLE KEYS */; /*!40000 ALTER TABLE `borrowrecord` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Table structure for table `student` -- Table structure for table `student`
-- --
DROP TABLE IF EXISTS `student`; DROP TABLE IF EXISTS `student`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8; SET character_set_client = utf8;
CREATE TABLE `student` ( CREATE TABLE `student` (
`s_id` int(20) NOT NULL, `s_id` int(20) NOT NULL,
`s_password` varchar(20) NOT NULL, `s_password` varchar(20) NOT NULL,
`s_name` varchar(20) NOT NULL, `s_name` varchar(20) NOT NULL,
PRIMARY KEY (`s_id`) PRIMARY KEY (`s_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `student` -- Dumping data for table `student`
-- --
LOCK TABLES `student` WRITE; LOCK TABLES `student` WRITE;
/*!40000 ALTER TABLE `student` DISABLE KEYS */; /*!40000 ALTER TABLE `student` DISABLE KEYS */;
INSERT INTO `student` VALUES (20160801,'123456','xzy'),(20160802,'123456','zxy'),(20160803,'123456','myj'),(20160804,'123456','zjh'); INSERT INTO `student` VALUES (20160801,'123456','xzy'),(20160802,'123456','zxy'),(20160803,'123456','myj'),(20160804,'123456','zjh');
/*!40000 ALTER TABLE `student` ENABLE KEYS */; /*!40000 ALTER TABLE `student` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-01-09 10:40:29 -- Dump completed on 2019-01-09 10:40:29

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"> <classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" path="src/main/resources"/> <classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>zxlogin</name> <name>zxlogin</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name> <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name> <name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name> <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name> <name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature> <nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src/main/webapp"/> <classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/> <classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes> <attributes>
<attribute name="hide" value="true"/> <attribute name="hide" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/> <classpathentry kind="output" path=""/>
</classpath> </classpath>

@ -1,3 +1,3 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF8 encoding//src/main/java=UTF8
encoding/<project>=UTF-8 encoding/<project>=UTF-8

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.8

@ -1,4 +1,4 @@
activeProfiles= activeProfiles=
eclipse.preferences.version=1 eclipse.preferences.version=1
resolveWorkspaceProjects=true resolveWorkspaceProjects=true
version=1 version=1

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="zxlogin"> <wb-module deploy-name="zxlogin">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="zxlogin"/> <property name="context-root" value="zxlogin"/>
<property name="java-output-path" value="/zxlogin/target/classes"/> <property name="java-output-path" value="/zxlogin/target/classes"/>
</wb-module> </wb-module>
</project-modules> </project-modules>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<fixed facet="wst.jsdt.web"/> <fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.5"/> <installed facet="java" version="1.5"/>
<installed facet="jst.web" version="2.3"/> <installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project> </faceted-project>

@ -1,2 +1,2 @@
disabled=06target disabled=06target
eclipse.preferences.version=1 eclipse.preferences.version=1

@ -1,154 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>zxtsgl</groupId> <groupId>zxtsgl</groupId>
<artifactId>zxlogin</artifactId> <artifactId>zxlogin</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>zxlogin Maven Webapp</name> <name>zxlogin Maven Webapp</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<!-- Generic properties --> <!-- Generic properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Spring --> <!-- Spring -->
<spring.version>4.3.10.RELEASE</spring.version> <spring.version>4.3.10.RELEASE</spring.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- mysql数据库驱动类 --> <!-- mysql数据库驱动类 -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version> <version>5.1.46</version>
</dependency> </dependency>
<!-- 导入MyBatis生成器 --> <!-- 导入MyBatis生成器 -->
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core --> <!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency> <dependency>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId> <artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version> <version>1.3.5</version>
</dependency> </dependency>
<!-- Spring --> <!-- Spring -->
<!-- 1)包含Spring 框架基本的核心工具类。Spring 其它组件要都要使用到这个包里的类, 是其它组件的基本核心 --> <!-- 1)包含Spring 框架基本的核心工具类。Spring 其它组件要都要使用到这个包里的类, 是其它组件的基本核心 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-core</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 2)这个jar 文件是所有应用都要用到的它包含访问配置文件、创建和管理bean 以及进行Inversion of Control <!-- 2)这个jar 文件是所有应用都要用到的它包含访问配置文件、创建和管理bean 以及进行Inversion of Control
/ Dependency InjectionIoC/DI操作相关的所有类。如果应用只需基本的IoC/DI 支持引入spring-core.jar / Dependency InjectionIoC/DI操作相关的所有类。如果应用只需基本的IoC/DI 支持引入spring-core.jar
及spring-beans.jar 文件就可以了。 --> 及spring-beans.jar 文件就可以了。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId> <artifactId>spring-beans</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 3)这个jar 文件为Spring 核心提供了大量扩展。可以找到使用Spring ApplicationContext特性时所需的全部类JDNI <!-- 3)这个jar 文件为Spring 核心提供了大量扩展。可以找到使用Spring ApplicationContext特性时所需的全部类JDNI
所需的全部类instrumentation组件以及校验Validation 方面的相关类。 --> 所需的全部类instrumentation组件以及校验Validation 方面的相关类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 4) 这个jar 文件包含对Spring 对JDBC 数据访问进行封装的所有类。 --> <!-- 4) 这个jar 文件包含对Spring 对JDBC 数据访问进行封装的所有类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId> <artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 5) 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事务管理。 --> <!-- 5) 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事务管理。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId> <artifactId>spring-tx</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 6)Spring web 包含Web应用开发时用到Spring框架时所需的核心类包括自动载入WebApplicationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量工具辅助类。 --> <!-- 6)Spring web 包含Web应用开发时用到Spring框架时所需的核心类包括自动载入WebApplicationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量工具辅助类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId> <artifactId>spring-web</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 7)包含SpringMVC框架相关的所有类。 --> <!-- 7)包含SpringMVC框架相关的所有类。 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId> <artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<!-- 8)Spring test 对JUNIT等测试框架的简单封装 --> <!-- 8)Spring test 对JUNIT等测试框架的简单封装 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
<version>${spring.version}</version> <version>${spring.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- DAO: MyBatis --> <!-- DAO: MyBatis -->
<dependency> <dependency>
<groupId>org.mybatis</groupId> <groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId> <artifactId>mybatis</artifactId>
<version>3.4.2</version> <version>3.4.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mybatis</groupId> <groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId> <artifactId>mybatis-spring</artifactId>
<version>1.3.1</version> <version>1.3.1</version>
</dependency> </dependency>
<!-- 连接技术 --> <!-- 连接技术 -->
<dependency> <dependency>
<groupId>c3p0</groupId> <groupId>c3p0</groupId>
<artifactId>c3p0</artifactId> <artifactId>c3p0</artifactId>
<version>0.9.1.2</version> <version>0.9.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-dbcp</groupId> <groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId> <artifactId>commons-dbcp</artifactId>
<version>1.4</version> <version>1.4</version>
</dependency> </dependency>
<!-- Servlet web --> <!-- Servlet web -->
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId> <artifactId>jstl</artifactId>
<version>1.2</version> <version>1.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<!-- 配置JDK插件 --> <!-- 配置JDK插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<encoding>UTF8</encoding> <encoding>UTF8</encoding>
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version> <version>1.3.5</version>
<configuration> <configuration>
<!--配置文件的路径 --> <!--配置文件的路径 -->
<configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile> <configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite> <overwrite>true</overwrite>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
<finalName>zxlogin</finalName> <finalName>zxlogin</finalName>
</build> </build>
</project> </project>

@ -1,3 +1,4 @@
<<<<<<< HEAD
package controller; package controller;
@ -54,3 +55,61 @@ public class LoginController {
} }
} }
=======
package controller;
import java.io.IOException;
import java.io.Writer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import service.LoginService;
import domain.UserPO;
@Controller
public class LoginController {
@Autowired@Qualifier("LoginServiceImpl")
private LoginService loginService;
@RequestMapping("/login")
public void login(int userid, int userpassword,
HttpServletRequest request, HttpServletResponse response) throws IOException {
UserPO userPO=this.loginService.FindByUserid(userid);
response.setContentType("text/html;charset=utf-8");
/* 设置响应头允许ajax跨域访问 */
response.setHeader("Access-Control-Allow-Origin", "*");
/* 星号表示所有的异域请求都可以接受, */
response.setHeader("Access-Control-Allow-Methods", "GET,POST");
System.out.println(userid);
if(userPO!=null)
if(userpassword==userPO.getUserpassword())
{
System.out.println("密码正确");
Writer out = response.getWriter();
out.write("111");
out.flush();
}
else{
System.out.println("密码错误");
Writer out = response.getWriter();
out.write("100");
out.flush();
}
else{
System.out.println("不存在用户名");
Writer out = response.getWriter();
out.write("001");
out.flush();
}
}
}
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6

@ -1,3 +1,4 @@
<<<<<<< HEAD
package domain; package domain;
import java.io.Serializable; import java.io.Serializable;
@ -27,3 +28,34 @@ public class UserPO implements Serializable{
} }
=======
package domain;
import java.io.Serializable;
public class UserPO implements Serializable{
private int userid;
private int userpassword;
private String username;
public int getUserid() {
return userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
public int getUserpassword() {
return userpassword;
}
public void setUserpassword(int userpassword) {
this.userpassword = userpassword;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6

@ -1,3 +1,4 @@
<<<<<<< HEAD
package mapperDAO; package mapperDAO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@ -10,3 +11,17 @@ public interface UserDAO {
} }
=======
package mapperDAO;
import org.springframework.stereotype.Repository;
import domain.UserPO;
@Repository("UserDAO")
public interface UserDAO {
public UserPO FindByUserid(int userid);
}
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6

@ -1,3 +1,4 @@
<<<<<<< HEAD
package service; package service;
import domain.UserPO; import domain.UserPO;
@ -6,3 +7,13 @@ public interface LoginService{
public UserPO FindByUserid(int s_id); public UserPO FindByUserid(int s_id);
} }
=======
package service;
import domain.UserPO;
public interface LoginService{
public UserPO FindByUserid(int userid);
}
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6

@ -1,3 +1,4 @@
<<<<<<< HEAD
package serviceimpl; package serviceimpl;
import mapperDAO.UserDAO; import mapperDAO.UserDAO;
@ -20,3 +21,27 @@ public class LoginServiceImpl implements LoginService{
} }
} }
=======
package serviceimpl;
import mapperDAO.UserDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import domain.UserPO;
import service.LoginService;
@Component("LoginServiceImpl")
public class LoginServiceImpl implements LoginService{
@Autowired@Qualifier("UserDAO")
private UserDAO userDAO;
public UserPO FindByUserid(int userid){
return this.userDAO.FindByUserid(userid);
}
}
>>>>>>> 0877d8ad681d47bc72cd343cd73f8dfb7321c3b6

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration> <generatorConfiguration>
<!-- JDBC数据库驱动jar文件 --> <!-- JDBC数据库驱动jar文件 -->
<classPathEntry location="D:\maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" /> <classPathEntry location="D:\maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" />
<context id="context1" defaultModelType="flat"> <context id="context1" defaultModelType="flat">
<!-- PO序列化 --> <!-- PO序列化 -->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"> <plugin type="org.mybatis.generator.plugins.SerializablePlugin">
</plugin> </plugin>
<commentGenerator> <commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 --> <!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="false" /> <property name="suppressAllComments" value="false" />
</commentGenerator> </commentGenerator>
<!-- 配置一个连接 --> <!-- 配置一个连接 -->
<jdbcConnection <jdbcConnection
driverClass="com.mysql.jdbc.Driver" driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/zx" connectionURL="jdbc:mysql://127.0.0.1:3306/zx"
userId="root" userId="root"
password="zjh19990323"> password="zjh19990323">
</jdbcConnection> </jdbcConnection>
<javaTypeResolver> <javaTypeResolver>
<property name="forceBigDecimals" value="false" /> <property name="forceBigDecimals" value="false" />
</javaTypeResolver> </javaTypeResolver>
<!--生成实体类存放位置 --> <!--生成实体类存放位置 -->
<javaModelGenerator targetPackage="domain" <javaModelGenerator targetPackage="domain"
targetProject="src/main/java"> targetProject="src/main/java">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</javaModelGenerator> </javaModelGenerator>
<!--生成映射文件存放位置 --> <!--生成映射文件存放位置 -->
<sqlMapGenerator targetPackage="mapper" <sqlMapGenerator targetPackage="mapper"
targetProject="src/main/resources"> targetProject="src/main/resources">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</sqlMapGenerator> </sqlMapGenerator>
<!--生成Mapper接口存放位置 --> <!--生成Mapper接口存放位置 -->
<javaClientGenerator targetPackage="mapperDAO" <javaClientGenerator targetPackage="mapperDAO"
targetProject="src/main/java" type="XMLMAPPER" /> targetProject="src/main/java" type="XMLMAPPER" />
<table schema="zx" tableName="student" enableCountByExample="false" <table schema="zx" tableName="student" enableCountByExample="false"
enableUpdateByExample="false" enableDeleteByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"> enableSelectByExample="false" selectByExampleQueryId="false">
</table> </table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mapperDAO.UserDAO"> <mapper namespace="mapperDAO.UserDAO">
<resultMap id="UserMap" type="domain.UserPO"> <resultMap id="UserMap" type="domain.UserPO">
<id column="s_id" jdbcType="INTEGER" property="userid" /> <id column="s_id" jdbcType="INTEGER" property="userid" />
<result column="s_name" jdbcType="VARCHAR" property="username" /> <result column="s_name" jdbcType="VARCHAR" property="username" />
<result column="s_password" jdbcType="INTEGER" property="userpassword" /> <result column="s_password" jdbcType="INTEGER" property="userpassword" />
</resultMap> </resultMap>
<select id="FindByUserid" resultMap="UserMap" parameterType="int"> <select id="FindByUserid" resultMap="UserMap" parameterType="int">
SELECT SELECT
student.s_id, student.s_id,
student.s_name, student.s_name,
student.s_password student.s_password
FROM student WHERE FROM student WHERE
student.s_id=#{userid} student.s_id=#{userid}
</select> </select>
</mapper> </mapper>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd"> "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <configuration>
</configuration> </configuration>

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<!-- 打开Spring的注解 --> <!-- 打开Spring的注解 -->
<context:annotation-config /> <context:annotation-config />
<context:component-scan base-package="mapperDAO,controller,serviceimpl"/> <context:component-scan base-package="mapperDAO,controller,serviceimpl"/>
</beans> </beans>

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc" <beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd"> http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 打开SpringMVC的注解 --> <!-- 打开SpringMVC的注解 -->
<annotation-driven /> <annotation-driven />
<!-- 配置静态资源的目录 --> <!-- 配置静态资源的目录 -->
<resources mapping="/resources/**" location="/resources/" /> <resources mapping="/resources/**" location="/resources/" />
<!-- 配置视图处理器 --> <!-- 配置视图处理器 -->
<beans:bean <beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver"> class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 视图前缀 --> <!-- 视图前缀 -->
<beans:property name="prefix" value="/WEB-INF/view/" /> <beans:property name="prefix" value="/WEB-INF/view/" />
<!-- 视图后缀 --> <!-- 视图后缀 -->
<beans:property name="suffix" value=".jsp" /> <beans:property name="suffix" value=".jsp" />
</beans:bean> </beans:bean>
</beans:beans> </beans:beans>

@ -1,38 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
<!-- 整合MyBatis 开始 --> <!-- 整合MyBatis 开始 -->
<!--创建jdbc数据源 --> <!--创建jdbc数据源 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="username" value="root" /> <property name="username" value="root" />
<property name="password" value="zjh19990323" /> <property name="password" value="zjh19990323" />
<property name="url" <property name="url"
value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" /> value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" />
</bean> </bean>
<!-- 配置MyBatis的sqlSession --> <!-- 配置MyBatis的sqlSession -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:mybatis.xml" /> <property name="configLocation" value="classpath:mybatis.xml" />
<property name="mapperLocations" value="classpath:mapper/*.xml" /> <property name="mapperLocations" value="classpath:mapper/*.xml" />
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
</bean> </bean>
<!-- 映射Mapper目录 --> <!-- 映射Mapper目录 -->
<!-- Mapper接口所在包名Spring会自动查找其下的Mapper --> <!-- Mapper接口所在包名Spring会自动查找其下的Mapper -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="mapperDAO" /> <property name="basePackage" value="mapperDAO" />
</bean> </bean>
<!-- 可通过注解控制事务 --> <!-- 可通过注解控制事务 -->
<tx:annotation-driven transaction-manager="transactionManager" /> <tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager" <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
</bean> </bean>
<!-- 整合MyBatis 结束 --> <!-- 整合MyBatis 结束 -->
</beans> </beans>

@ -1,20 +1,20 @@
<!DOCTYPE web-app PUBLIC <!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > "http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app> <web-app>
<display-name>Archetype Created Web Application</display-name> <display-name>Archetype Created Web Application</display-name>
<!-- Processes application requests --> <!-- Processes application requests -->
<servlet> <servlet>
<servlet-name>appServlet</servlet-name> <servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param> <init-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-*.xml</param-value> <param-value>classpath:spring-*.xml</param-value>
</init-param> </init-param>
<load-on-startup>1</load-on-startup> <load-on-startup>1</load-on-startup>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>appServlet</servlet-name> <servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern> <url-pattern>/</url-pattern>
</servlet-mapping> </servlet-mapping>
</web-app> </web-app>

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration> <generatorConfiguration>
<!-- JDBC数据库驱动jar文件 --> <!-- JDBC数据库驱动jar文件 -->
<classPathEntry location="D:\maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" /> <classPathEntry location="D:\maven\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar" />
<context id="context1" defaultModelType="flat"> <context id="context1" defaultModelType="flat">
<!-- PO序列化 --> <!-- PO序列化 -->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"> <plugin type="org.mybatis.generator.plugins.SerializablePlugin">
</plugin> </plugin>
<commentGenerator> <commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 --> <!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="false" /> <property name="suppressAllComments" value="false" />
</commentGenerator> </commentGenerator>
<!-- 配置一个连接 --> <!-- 配置一个连接 -->
<jdbcConnection <jdbcConnection
driverClass="com.mysql.jdbc.Driver" driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/zx" connectionURL="jdbc:mysql://127.0.0.1:3306/zx"
userId="root" userId="root"
password="zjh19990323"> password="zjh19990323">
</jdbcConnection> </jdbcConnection>
<javaTypeResolver> <javaTypeResolver>
<property name="forceBigDecimals" value="false" /> <property name="forceBigDecimals" value="false" />
</javaTypeResolver> </javaTypeResolver>
<!--生成实体类存放位置 --> <!--生成实体类存放位置 -->
<javaModelGenerator targetPackage="domain" <javaModelGenerator targetPackage="domain"
targetProject="src/main/java"> targetProject="src/main/java">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</javaModelGenerator> </javaModelGenerator>
<!--生成映射文件存放位置 --> <!--生成映射文件存放位置 -->
<sqlMapGenerator targetPackage="mapper" <sqlMapGenerator targetPackage="mapper"
targetProject="src/main/resources"> targetProject="src/main/resources">
<property name="trimStrings" value="true" /> <property name="trimStrings" value="true" />
</sqlMapGenerator> </sqlMapGenerator>
<!--生成Mapper接口存放位置 --> <!--生成Mapper接口存放位置 -->
<javaClientGenerator targetPackage="mapperDAO" <javaClientGenerator targetPackage="mapperDAO"
targetProject="src/main/java" type="XMLMAPPER" /> targetProject="src/main/java" type="XMLMAPPER" />
<table schema="zx" tableName="student" enableCountByExample="false" <table schema="zx" tableName="student" enableCountByExample="false"
enableUpdateByExample="false" enableDeleteByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"> enableSelectByExample="false" selectByExampleQueryId="false">
</table> </table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mapperDAO.UserDAO"> <mapper namespace="mapperDAO.UserDAO">
<resultMap id="UserMap" type="domain.UserPO"> <resultMap id="UserMap" type="domain.UserPO">
<id column="s_id" jdbcType="INTEGER" property="userid" /> <id column="s_id" jdbcType="INTEGER" property="userid" />
<result column="s_name" jdbcType="VARCHAR" property="username" /> <result column="s_name" jdbcType="VARCHAR" property="username" />
<result column="s_password" jdbcType="INTEGER" property="userpassword" /> <result column="s_password" jdbcType="INTEGER" property="userpassword" />
</resultMap> </resultMap>
<select id="FindByUserid" resultMap="UserMap" parameterType="int"> <select id="FindByUserid" resultMap="UserMap" parameterType="int">
SELECT SELECT
student.s_id, student.s_id,
student.s_name, student.s_name,
student.s_password student.s_password
FROM student WHERE FROM student WHERE
student.s_id=#{userid} student.s_id=#{userid}
</select> </select>
</mapper> </mapper>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd"> "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <configuration>
</configuration> </configuration>

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<!-- 打开Spring的注解 --> <!-- 打开Spring的注解 -->
<context:annotation-config /> <context:annotation-config />
<context:component-scan base-package="mapperDAO,controller,serviceimpl"/> <context:component-scan base-package="mapperDAO,controller,serviceimpl"/>
</beans> </beans>

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc" <beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd"> http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 打开SpringMVC的注解 --> <!-- 打开SpringMVC的注解 -->
<annotation-driven /> <annotation-driven />
<!-- 配置静态资源的目录 --> <!-- 配置静态资源的目录 -->
<resources mapping="/resources/**" location="/resources/" /> <resources mapping="/resources/**" location="/resources/" />
<!-- 配置视图处理器 --> <!-- 配置视图处理器 -->
<beans:bean <beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver"> class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 视图前缀 --> <!-- 视图前缀 -->
<beans:property name="prefix" value="/WEB-INF/view/" /> <beans:property name="prefix" value="/WEB-INF/view/" />
<!-- 视图后缀 --> <!-- 视图后缀 -->
<beans:property name="suffix" value=".jsp" /> <beans:property name="suffix" value=".jsp" />
</beans:bean> </beans:bean>
</beans:beans> </beans:beans>

@ -1,38 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
<!-- 整合MyBatis 开始 --> <!-- 整合MyBatis 开始 -->
<!--创建jdbc数据源 --> <!--创建jdbc数据源 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="username" value="root" /> <property name="username" value="root" />
<property name="password" value="zjh19990323" /> <property name="password" value="zjh19990323" />
<property name="url" <property name="url"
value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" /> value="jdbc:mysql://127.0.0.1:3306/zx?useUnicode=true&amp;characterEncoding=utf8" />
</bean> </bean>
<!-- 配置MyBatis的sqlSession --> <!-- 配置MyBatis的sqlSession -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:mybatis.xml" /> <property name="configLocation" value="classpath:mybatis.xml" />
<property name="mapperLocations" value="classpath:mapper/*.xml" /> <property name="mapperLocations" value="classpath:mapper/*.xml" />
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
</bean> </bean>
<!-- 映射Mapper目录 --> <!-- 映射Mapper目录 -->
<!-- Mapper接口所在包名Spring会自动查找其下的Mapper --> <!-- Mapper接口所在包名Spring会自动查找其下的Mapper -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="mapperDAO" /> <property name="basePackage" value="mapperDAO" />
</bean> </bean>
<!-- 可通过注解控制事务 --> <!-- 可通过注解控制事务 -->
<tx:annotation-driven transaction-manager="transactionManager" /> <tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager" <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
</bean> </bean>
<!-- 整合MyBatis 结束 --> <!-- 整合MyBatis 结束 -->
</beans> </beans>

@ -1,5 +1,5 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Built-By: zhujiehuang Built-By: zhujiehuang
Build-Jdk: 1.8.0_152 Build-Jdk: 1.8.0_152
Created-By: Maven Integration for Eclipse Created-By: Maven Integration for Eclipse

@ -1,7 +1,7 @@
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Thu Jan 10 00:26:11 CST 2019 #Thu Jan 10 00:26:11 CST 2019
version=0.0.1-SNAPSHOT version=0.0.1-SNAPSHOT
groupId=zxtsglxt groupId=zxtsglxt
m2e.projectName=zxlogin m2e.projectName=zxlogin
m2e.projectLocation=D\:\\sts worksapce\\zxlogin m2e.projectLocation=D\:\\sts worksapce\\zxlogin
artifactId=zxlogin artifactId=zxlogin

@ -1,21 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>zxtsglxt</groupId> <groupId>zxtsglxt</groupId>
<artifactId>zxlogin</artifactId> <artifactId>zxlogin</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>zxlogin Maven Webapp</name> <name>zxlogin Maven Webapp</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>zxlogin</finalName> <finalName>zxlogin</finalName>
</build> </build>
</project> </project>

@ -1,132 +1,132 @@
CREATE DATABASE IF NOT EXISTS `` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */; CREATE DATABASE IF NOT EXISTS `` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
USE ``; USE ``;
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
-- --
-- Host: localhost Database: 真香图书管理系统 -- Host: localhost Database: 真香图书管理系统
-- ------------------------------------------------------ -- ------------------------------------------------------
-- Server version 8.0.13 -- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8 ; SET NAMES utf8 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */; /*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_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' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- --
-- Table structure for table `book` -- Table structure for table `book`
-- --
DROP TABLE IF EXISTS `book`; DROP TABLE IF EXISTS `book`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ; SET character_set_client = utf8mb4 ;
CREATE TABLE `book` ( CREATE TABLE `book` (
`book_id` int(20) NOT NULL, `book_id` int(20) NOT NULL,
`book_name` varchar(45) NOT NULL, `book_name` varchar(45) NOT NULL,
`book_author` varchar(20) NOT NULL, `book_author` varchar(20) NOT NULL,
`book_num` int(5) NOT NULL, `book_num` int(5) NOT NULL,
`book_sort` varchar(20) NOT NULL, `book_sort` varchar(20) NOT NULL,
`book_image` varchar(45) DEFAULT NULL, `book_image` varchar(45) DEFAULT NULL,
PRIMARY KEY (`book_id`,`book_name`) PRIMARY KEY (`book_id`,`book_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `book` -- Dumping data for table `book`
-- --
LOCK TABLES `book` WRITE; LOCK TABLES `book` WRITE;
/*!40000 ALTER TABLE `book` DISABLE KEYS */; /*!40000 ALTER TABLE `book` DISABLE KEYS */;
INSERT INTO `book` VALUES (1,'中国史学入门','顾颉刚',10,'历史人文类',NULL),(2,'明朝那些事儿','石悦',10,'历史人文类',NULL),(3,'袁氏当国','唐德刚',10,'历史人文类',NULL),(4,'天朝的崩溃','茅海建',10,'历史人文类',NULL),(5,'东晋门阀政治','田余庆',10,'历史人文类',NULL),(6,'通俗天文学','(美)西蒙·纽康 ',10,'自然科学类',NULL),(7,'自私的基因','[英]理查德·道金斯',10,'自然科学类',NULL),(8,'发现之旅','托尼赖斯',10,'自然科学类',NULL),(9,'宇宙之书','约翰.D.巴罗',10,'自然科学类',NULL); INSERT INTO `book` VALUES (1,'中国史学入门','顾颉刚',10,'历史人文类',NULL),(2,'明朝那些事儿','石悦',10,'历史人文类',NULL),(3,'袁氏当国','唐德刚',10,'历史人文类',NULL),(4,'天朝的崩溃','茅海建',10,'历史人文类',NULL),(5,'东晋门阀政治','田余庆',10,'历史人文类',NULL),(6,'通俗天文学','(美)西蒙·纽康 ',10,'自然科学类',NULL),(7,'自私的基因','[英]理查德·道金斯',10,'自然科学类',NULL),(8,'发现之旅','托尼赖斯',10,'自然科学类',NULL),(9,'宇宙之书','约翰.D.巴罗',10,'自然科学类',NULL);
/*!40000 ALTER TABLE `book` ENABLE KEYS */; /*!40000 ALTER TABLE `book` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Table structure for table `borrowrecord` -- Table structure for table `borrowrecord`
-- --
DROP TABLE IF EXISTS `borrowrecord`; DROP TABLE IF EXISTS `borrowrecord`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ; SET character_set_client = utf8mb4 ;
CREATE TABLE `borrowrecord` ( CREATE TABLE `borrowrecord` (
`s_id` int(20) NOT NULL, `s_id` int(20) NOT NULL,
`book_id` int(20) NOT NULL, `book_id` int(20) NOT NULL,
`s_name` varchar(20) NOT NULL, `s_name` varchar(20) NOT NULL,
`book_name` varchar(20) NOT NULL, `book_name` varchar(20) NOT NULL,
`book_num` int(5) NOT NULL, `book_num` int(5) NOT NULL,
PRIMARY KEY (`s_id`,`book_id`) PRIMARY KEY (`s_id`,`book_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `borrowrecord` -- Dumping data for table `borrowrecord`
-- --
LOCK TABLES `borrowrecord` WRITE; LOCK TABLES `borrowrecord` WRITE;
/*!40000 ALTER TABLE `borrowrecord` DISABLE KEYS */; /*!40000 ALTER TABLE `borrowrecord` DISABLE KEYS */;
/*!40000 ALTER TABLE `borrowrecord` ENABLE KEYS */; /*!40000 ALTER TABLE `borrowrecord` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Table structure for table `manager` -- Table structure for table `manager`
-- --
DROP TABLE IF EXISTS `manager`; DROP TABLE IF EXISTS `manager`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ; SET character_set_client = utf8mb4 ;
CREATE TABLE `manager` ( CREATE TABLE `manager` (
`m_id` int(20) NOT NULL, `m_id` int(20) NOT NULL,
`m_password` varchar(20) NOT NULL, `m_password` varchar(20) NOT NULL,
PRIMARY KEY (`m_id`) PRIMARY KEY (`m_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `manager` -- Dumping data for table `manager`
-- --
LOCK TABLES `manager` WRITE; LOCK TABLES `manager` WRITE;
/*!40000 ALTER TABLE `manager` DISABLE KEYS */; /*!40000 ALTER TABLE `manager` DISABLE KEYS */;
INSERT INTO `manager` VALUES (1,'000000'),(2,'000000'); INSERT INTO `manager` VALUES (1,'000000'),(2,'000000');
/*!40000 ALTER TABLE `manager` ENABLE KEYS */; /*!40000 ALTER TABLE `manager` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Table structure for table `student` -- Table structure for table `student`
-- --
DROP TABLE IF EXISTS `student`; DROP TABLE IF EXISTS `student`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ; SET character_set_client = utf8mb4 ;
CREATE TABLE `student` ( CREATE TABLE `student` (
`s_id` int(20) NOT NULL, `s_id` int(20) NOT NULL,
`s_password` varchar(20) NOT NULL, `s_password` varchar(20) NOT NULL,
`s_name` varchar(20) NOT NULL, `s_name` varchar(20) NOT NULL,
PRIMARY KEY (`s_id`) PRIMARY KEY (`s_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Dumping data for table `student` -- Dumping data for table `student`
-- --
LOCK TABLES `student` WRITE; LOCK TABLES `student` WRITE;
/*!40000 ALTER TABLE `student` DISABLE KEYS */; /*!40000 ALTER TABLE `student` DISABLE KEYS */;
INSERT INTO `student` VALUES (20160801,'123456','xzy'),(20160802,'123456','zxy'),(20160803,'123456','myj'),(20160804,'123456','zjh'); INSERT INTO `student` VALUES (20160801,'123456','xzy'),(20160802,'123456','zxy'),(20160803,'123456','myj'),(20160804,'123456','zjh');
/*!40000 ALTER TABLE `student` ENABLE KEYS */; /*!40000 ALTER TABLE `student` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-01-11 10:30:38 -- Dump completed on 2019-01-11 10:30:38

@ -0,0 +1,129 @@
# ************************************************************
# Sequel Pro SQL dump
# Version 5426
#
# https://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 134.175.3.34 (MySQL 5.5.57-log)
# Database: 真香图书管理系统
# Generation Time: 2019-01-11 08:55:39 +0000
# ************************************************************
/*!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 */;
SET NAMES utf8mb4;
/*!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 */;
# Dump of table book
# ------------------------------------------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`book_id` int(20) NOT NULL,
`book_name` varchar(45) NOT NULL,
`book_author` varchar(20) NOT NULL,
`book_num` int(5) NOT NULL,
`book_sort` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`book_id`,`book_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `book` WRITE;
/*!40000 ALTER TABLE `book` DISABLE KEYS */;
INSERT INTO `book` (`book_id`, `book_name`, `book_author`, `book_num`, `book_sort`)
VALUES
(1,'《四书五经合集》','古代多人',20,'文学名著类'),
(2,'《人生》','路遥',21,'文学名著类'),
(3,'《中华上下五千年》','佚名',19,'文学名著类'),
(4,'《百年孤独》','佚名',17,'文学名著类'),
(5,'《大秦帝国》','佚名',23,'文学名著类'),
(6,'《兄弟》','余华',21,'文学名著类'),
(7,'《激荡30年》','佚名',25,'文学名著类'),
(8,'《沧浪之水》','佚名',19,'文学名著类'),
(9,'《席绢全集》','席绢',23,'文学名著类'),
(10,'《格列佛游记》','佚名',18,'文学名著类'),
(11,'《洛丽塔》','佚名',18,'文学名著类'),
(12,'《林徽因传》','张清平',16,'文学名著类'),
(13,'《莎士比亚十四行诗集》','佚名',20,'文学名著类'),
(14,'《陈良宇传奇》','佚名',21,'文学名著类'),
(15,'《邓小平传》','佚名',17,'文学名著类'),
(16,'《滚雪球:巴菲特和他的财富人生》','佚名',17,'文学名著类'),
(17,'《老人与海》','佚名',21,'文学名著类'),
(18,'《忏悔录》','卢梭',22,'文学名著类'),
(19,'《海岩全集》','佚名',24,'文学名著类'),
(20,'《三毛全集》','佚名',20,'文学名著类'),
(21,'《人性的光辉:林肯传》','戴尔·卡耐基',18,'文学名著类'),
(22,'《呼啸山庄》','佚名',21,'文学名著类'),
(23,'《村上春树全集》','佚名',20,'文学名著类'),
(24,'《红与黑》','佚名',21,'文学名著类'),
(25,'《孙中山全传》','佚名',18,'文学名著类'),
(26,'《本草纲目》','李时珍',16,'文学名著类'),
(27,'《一口气读完世界史》','佚名',17,'文学名著类'),
(28,'《平凡的世界》','路遥',25,'文学名著类'),
(29,'《巨星闪耀》','郭宏军',24,'文学名著类'),
(30,'《白话山海经》','佚名',19,'文学名著类'),
(31,'《枪手的新娘》','佚名',24,'文学名著类'),
(32,'《李安传:十年一觉电影梦》','张靓蓓',19,'文学名著类'),
(33,'《一个陌生女人的来信》','佚名',18,'文学名著类'),
(34,'《北洋军阀统治时期史话》','佚名',24,'文学名著类'),
(35,'《鲁宾逊漂流记》','佚名',21,'文学名著类'),
(36,'《三毛作品集》','三毛',17,'文学名著类'),
(37,'《菊与刀》','佚名',25,'文学名著类'),
(38,'《歌舞伎町案内人》','佚名',21,'文学名著类'),
(39,'《红顶商人胡雪岩》','佚名',16,'文学名著类'),
(40,'《汉武帝》','叶绍翁',25,'文学名著类'),
(41,'《灯草和尚》','高则诚',16,'文学名著类'),
(42,'《路遥全集》','佚名',20,'文学名著类'),
(43,'《古文观止+译文》','佚名',24,'文学名著类'),
(44,'《风雨独立路-李光耀传》','李光耀',23,'文学名著类'),
(45,'《余华文集》','余华',21,'文学名著类'),
(46,'《张小娴作品集》','张小娴',24,'文学名著类'),
(47,'《明亡清兴六十年》','佚名',25,'文学名著类'),
(48,'《千年一叹-余秋雨》','佚名',24,'文学名著类'),
(49,'《我的禅》','卫慧',19,'文学名著类'),
(50,'《川端康成文集》','佚名',19,'文学名著类'),
(51,'《天龙八部》','金庸',20,'文学名著类'),
(52,'《沉思录II》','佚名',17,'文学名著类'),
(53,'《雍正王朝:恨水东逝》','佚名',22,'文学名著类'),
(54,'《莎士比亚全集》','莎士比亚',23,'文学名著类'),
(55,'《中国史学入门》','顾颉刚',10,'人文历史类'),
(56,'《明朝那些事儿》','石悦',15,'人文历史类'),
(57,'《袁氏当国》','唐德刚',12,'人文历史类'),
(58,'《天朝的崩溃》','茅海建',5,'人文历史类'),
(59,'《东晋门阀政治》','田余庆',20,'人文历史类'),
(60,'《通俗天文学》','(美)西蒙·纽康 ',23,'自然科学类'),
(61,'《自私的基因》','[英]理查德·道金斯',45,'自然科学类'),
(62,'《发现之旅》','托尼赖斯',20,'自然科学类'),
(63,'《宇宙之书》','约翰.D.巴罗',18,'自然科学类'),
(64,'《信号与系统》','Alan V.Oppenheim',20,'计算机类'),
(65,'《第一行代码》','郭霖',10,'计算机类'),
(66,'《HTTP权威指南》',' David Gourley',9,'计算机类'),
(67,'《解TCP/IP : 第5版》','[日]竹下隆史',10,'计算机类'),
(68,'《肿瘤常见症状的中西医处理手册》','李萍萍 ',5,'医学类'),
(69,'《中国的医药》','魏子孝&聂丽芳',6,'医学类'),
(70,'《中华医药学史》','林品石',7,'医学类'),
(71,'《中医熟记的100种中药》','肖锦仁',8,'医学类'),
(72,'《永续农业概论》','莫里森',20,'农学类'),
(73,'《全息自然农法实现》','何以兴农',18,'农学类'),
(74,'《作物育种学》','席章营',5,'农学类'),
(75,'《中国农学史》','曾雄生',20,'农学类');
/*!40000 ALTER TABLE `book` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;
Loading…
Cancel
Save