parent
572188f956
commit
716bca9ef9
Binary file not shown.
@ -0,0 +1 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
|
@ -0,0 +1,79 @@
|
||||
<?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"
|
||||
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>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>demo</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<optional>true</optional><!-- 这个需要为 true 热部署才有效 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
</dependency>
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.13</version>
|
||||
</dependency>
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- servlet -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,4 @@
|
||||
package com.example.demo.Dao;
|
||||
import com.example.demo.bean.book;
|
||||
public interface bookMapper {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.example.demo.Dao;
|
||||
|
||||
import com.example.demo.bean.borrowrecord;
|
||||
|
||||
public interface borrowrecordMapper {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.example.demo.Dao;
|
||||
|
||||
import com.example.demo.bean.student;
|
||||
import java.util.List;
|
||||
public interface studentMapper{
|
||||
@Select("select * from student where s_id = #{s_id}")
|
||||
public student selectAudioByS_id(long s_id);
|
||||
@Select("select * from student")
|
||||
public List<student> select();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
public class book {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
@ID
|
||||
private long book_id;
|
||||
private string book_name;
|
||||
private string author;
|
||||
private string book_sort;
|
||||
private int book_num;
|
||||
|
||||
public long getBook_id() {
|
||||
return book_id;
|
||||
}
|
||||
|
||||
public void setBook_id(long book_id) {
|
||||
this.book_id = book_id;
|
||||
}
|
||||
|
||||
public string getBook_name() {
|
||||
return book_name;
|
||||
}
|
||||
|
||||
public void setBook_name(string book_name) {
|
||||
this.book_name = book_name;
|
||||
}
|
||||
|
||||
public string getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(string author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public string getBook_sort() {
|
||||
return book_sort;
|
||||
}
|
||||
|
||||
public void setBook_sort(string book_sort) {
|
||||
this.book_sort = book_sort;
|
||||
}
|
||||
|
||||
public int getBook_num() {
|
||||
return book_num;
|
||||
}
|
||||
|
||||
public void setBook_num(int book_num) {
|
||||
this.book_num = book_num;
|
||||
}
|
||||
|
||||
public book(){};
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
|
||||
@EntityScan
|
||||
public class borrowrecord {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
@ID
|
||||
private long s_id;
|
||||
private long book_id;
|
||||
private string s_name;
|
||||
|
||||
public long getS_id() {
|
||||
return s_id;
|
||||
}
|
||||
|
||||
public void setS_id(long s_id) {
|
||||
this.s_id = s_id;
|
||||
}
|
||||
|
||||
public long getBook_id() {
|
||||
return book_id;
|
||||
}
|
||||
|
||||
public void setBook_id(long book_id) {
|
||||
this.book_id = book_id;
|
||||
}
|
||||
|
||||
public string getS_name() {
|
||||
return s_name;
|
||||
}
|
||||
|
||||
public void setS_name(string s_name) {
|
||||
this.s_name = s_name;
|
||||
}
|
||||
|
||||
public string getBook_name() {
|
||||
return book_name;
|
||||
}
|
||||
|
||||
public void setBook_name(string book_name) {
|
||||
this.book_name = book_name;
|
||||
}
|
||||
|
||||
public string getBorrowtime() {
|
||||
return borrowtime;
|
||||
}
|
||||
|
||||
public void setBorrowtime(string borrowtime) {
|
||||
this.borrowtime = borrowtime;
|
||||
}
|
||||
|
||||
public string getSenttime() {
|
||||
return senttime;
|
||||
}
|
||||
|
||||
public void setSenttime(string senttime) {
|
||||
this.senttime = senttime;
|
||||
}
|
||||
|
||||
private string book_name;
|
||||
private string borrowtime;
|
||||
private string senttime;
|
||||
public borrowrecord(){};
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.example.demo.bean;
|
||||
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
@EntityScan
|
||||
public class student {
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
@ID
|
||||
private long s_id;
|
||||
private String s_name;
|
||||
private String s_password;
|
||||
|
||||
public long getS_id() {
|
||||
return s_id;
|
||||
}
|
||||
|
||||
public void setS_id(long s_id) {
|
||||
this.s_id = s_id;
|
||||
}
|
||||
|
||||
public String getS_name() {
|
||||
return s_name;
|
||||
}
|
||||
|
||||
public void setS_name(string s_name) {
|
||||
this.s_name = s_name;
|
||||
}
|
||||
|
||||
public string getS_password() {
|
||||
return s_password;
|
||||
}
|
||||
|
||||
public void setS_password(string s_password) {
|
||||
this.s_password = s_password;
|
||||
}
|
||||
|
||||
public student() {};
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue