forked from baomidou/mybatis-plus-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
067a846
commit e7e7202
Showing
55 changed files
with
983 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?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>com.baomidou</groupId> | ||
<artifactId>mybatis-plus-samples</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>mybatis-plus-mysql-demo</artifactId> | ||
|
||
<properties> | ||
<maven.compiler.source>17</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
<scope>annotationProcessor</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.baomidou</groupId> | ||
<artifactId>${mybatisplus.artifactId}</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.baomidou</groupId> | ||
<artifactId>mybatis-plus-generator</artifactId> | ||
</dependency> | ||
<!-- 模板引擎 --> | ||
<dependency> | ||
<groupId>org.apache.velocity</groupId> | ||
<artifactId>velocity-engine-core</artifactId> | ||
<version>2.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
mybatis-plus-mysql-demo/src/main/java/com/baomidou/DemoApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.baomidou; | ||
|
||
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); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/AccountController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/account") | ||
public class AccountController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/ActorController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/actor") | ||
public class ActorController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/EmployeesController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 员工记录表 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/employees") | ||
public class EmployeesController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/FilmActorController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/filmActor") | ||
public class FilmActorController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/FilmController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/film") | ||
public class FilmController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/MylockController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/mylock") | ||
public class MylockController { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/T1Controller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/t1") | ||
public class T1Controller { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
mybatis-plus-mysql-demo/src/main/java/com/baomidou/controller/T2Controller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.baomidou.controller; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
/** | ||
* <p> | ||
* 前端控制器 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Controller | ||
@RequestMapping("/t2") | ||
public class T2Controller { | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
mybatis-plus-mysql-demo/src/main/java/com/baomidou/entity/Account.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.baomidou.entity; | ||
|
||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
public class Account { | ||
private Long id; | ||
private String name; | ||
private Integer balance; | ||
} |
27 changes: 27 additions & 0 deletions
27
mybatis-plus-mysql-demo/src/main/java/com/baomidou/entity/Actor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.baomidou.entity; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <p> | ||
* | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Actor implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private Integer id; | ||
|
||
private String name; | ||
|
||
private LocalDateTime updateTime; | ||
} |
46 changes: 46 additions & 0 deletions
46
mybatis-plus-mysql-demo/src/main/java/com/baomidou/entity/Employees.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.baomidou.entity; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <p> | ||
* 员工记录表 | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Employees implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@TableId(value = "id", type = IdType.AUTO) | ||
private Integer id; | ||
|
||
/** | ||
* 姓名 | ||
*/ | ||
private String name; | ||
|
||
/** | ||
* 年龄 | ||
*/ | ||
private Integer age; | ||
|
||
/** | ||
* 职位 | ||
*/ | ||
private String position; | ||
|
||
/** | ||
* 入职时间 | ||
*/ | ||
private LocalDateTime hireTime; | ||
} |
27 changes: 27 additions & 0 deletions
27
mybatis-plus-mysql-demo/src/main/java/com/baomidou/entity/Film.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.baomidou.entity; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import java.io.Serializable; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <p> | ||
* | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Film implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@TableId(value = "id", type = IdType.AUTO) | ||
private Integer id; | ||
|
||
private String name; | ||
} |
30 changes: 30 additions & 0 deletions
30
mybatis-plus-mysql-demo/src/main/java/com/baomidou/entity/FilmActor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.baomidou.entity; | ||
|
||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import java.io.Serializable; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <p> | ||
* | ||
* </p> | ||
* | ||
* @author qiao | ||
* @since 2024-09-10 23:23:45 | ||
*/ | ||
@Getter | ||
@Setter | ||
@TableName("film_actor") | ||
public class FilmActor implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private Integer id; | ||
|
||
private Integer filmId; | ||
|
||
private Integer actorId; | ||
|
||
private String remark; | ||
} |
Oops, something went wrong.