generated from JUZIZZZ/javaee
task第一次上传
This commit is contained in:
parent
d76cd4b2a2
commit
46759ad896
|
@ -0,0 +1,101 @@
|
|||
<?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 https://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>3.3.4</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.gezenghuang.springboot</groupId>
|
||||
<artifactId>comc202210010133task1</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>com.c202210010133.task1</name>
|
||||
<description>com.c202210010133.task1</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>3.3.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
<version>5.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.25</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.controller;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.Books;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.service.BooksService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/books") // 统一前缀
|
||||
public class BooksController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BooksController.class);
|
||||
|
||||
@Autowired
|
||||
private BooksService booksService;
|
||||
|
||||
@GetMapping("/addbookspage")
|
||||
public String addBooksPage() {
|
||||
return "addbooks";
|
||||
}
|
||||
|
||||
@PostMapping("/addbookscommit")
|
||||
public String addBooksCommit(@ModelAttribute Books books) {
|
||||
try {
|
||||
booksService.addBooks(books);
|
||||
logger.info("Book added successfully: {}", books);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error adding book: {}", books, e);
|
||||
// 处理异常后重定向到错误页面或显示错误消息
|
||||
return "error"; // 假设有一个错误页面
|
||||
}
|
||||
return "redirect:/books";
|
||||
}
|
||||
|
||||
@GetMapping("/deletebooks/{id}")
|
||||
public String deleteBooks(@PathVariable int id) {
|
||||
try {
|
||||
booksService.deleteBooks(id);
|
||||
logger.info("Book with ID {} deleted successfully", id);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error deleting book with ID {}: {}", id, e.getMessage());
|
||||
// 处理异常后重定向到错误页面或显示错误消息
|
||||
return "error"; // 假设有一个错误页面
|
||||
}
|
||||
return "redirect:/books";
|
||||
}
|
||||
|
||||
@PostMapping("/updatebookscommit")
|
||||
public String updateBooksCommit(@ModelAttribute Books books) {
|
||||
try {
|
||||
booksService.updateBooks(books);
|
||||
logger.info("Book updated successfully: {}", books);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error updating book: {}", books, e);
|
||||
// 处理异常后重定向到错误页面或显示错误消息
|
||||
return "error"; // 假设有一个错误页面
|
||||
}
|
||||
return "redirect:/books";
|
||||
}
|
||||
|
||||
@GetMapping("/updatebooks/{id}")
|
||||
public String updateBooks(@PathVariable int id, Model model) {
|
||||
Books book = booksService.getBookById(id); // 假设有一个方法获取书籍
|
||||
if (book == null) {
|
||||
logger.error("Book with ID {} not found", id);
|
||||
return "error"; // 假设有一个错误页面
|
||||
}
|
||||
model.addAttribute("books", book);
|
||||
return "updatebooks";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.controller;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.User;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class LoginController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@GetMapping("/login")
|
||||
public String login() {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@PostMapping("/logincommit")
|
||||
public String logincommit(@RequestParam("username") String username, @RequestParam("password") String password) {
|
||||
if (userService.login(username, password)) {
|
||||
return "redirect:/books";
|
||||
} else {
|
||||
return "fail.html";
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/register")
|
||||
public String register() {
|
||||
return "register";
|
||||
}
|
||||
|
||||
@PostMapping("/registercommit")
|
||||
public String registercommit(User user) {
|
||||
userService.addUser(user);
|
||||
return "redirect:/login";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.dao;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.Books;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BookMapper {
|
||||
public List<Books> getAllBooks();
|
||||
public int addBooks(Books books);
|
||||
public int deleteBooks(int id);
|
||||
public int updateBooks(Books books);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.dao;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserMapper {
|
||||
public User getUser(String username, String password);
|
||||
public int addUser(User user);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Books {
|
||||
private int id;
|
||||
private String title;
|
||||
private String author;
|
||||
private String isbn;
|
||||
private String publisher;
|
||||
private String published_date;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class User {
|
||||
private int id;
|
||||
private String name;
|
||||
private String password;
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.service;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.Books;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.awt.print.Book;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface BooksService {
|
||||
public List<Books> getAllBooks();
|
||||
public int addBooks(Books books);
|
||||
public int deleteBooks(int id);
|
||||
public int updateBooks(Books books);
|
||||
|
||||
Books getBookById(int id);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.service;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.User;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface UserService {
|
||||
public User getUser(String username, String password);
|
||||
public int addUser(User user);
|
||||
|
||||
boolean login(String username, String password);
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.service.impl;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.Books;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.service.BooksService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.awt.print.Book;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BookServiceImpl implements BooksService {
|
||||
|
||||
|
||||
@Override
|
||||
public int addBooks(Books book) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBooks(int id) {
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBooks(Books book) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void updateBooks(Book book) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Books getBookById(int id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Books> getAllBooks() {
|
||||
return List.of();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1.service.impl;
|
||||
|
||||
import com.gezenghuang.springboot.comc202210010133task1.dao.UserMapper;
|
||||
import com.gezenghuang.springboot.comc202210010133task1.model.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserServiceImpl {
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
public boolean login(String username, String password) {
|
||||
User user = userMapper.getUser(username, password);
|
||||
if(user != null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public int register(User user) {
|
||||
return userMapper.addUser(user);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
spring.application.name=com.c202210010133.task1
|
||||
server.port=8080
|
||||
# ??????
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
# ?????
|
||||
spring.datasource.name=defaultDataSource
|
||||
# ???????
|
||||
spring.datasource.url=jdbc:mysql://106.53.194.250:63306/mybatis202210010133?serverTimezone=UTC
|
||||
# ??????&???
|
||||
spring.datasource.username=202210010133
|
||||
spring.datasource.password=@hnucm1254
|
||||
#??????????MyBatis??
|
||||
#??Mybatis?Mapper??
|
||||
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||
#??Mybatis?????
|
||||
mybatis.type-aliases-package=com.gezenghuang.springboot.comc202210010133task1
|
||||
|
||||
logging.level.com.gezenghuang.springboot.comc202210010133task1 = debug
|
|
@ -0,0 +1,28 @@
|
|||
<?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">
|
||||
|
||||
<mapper namespace="com.gezenghuang.springboot.comc202210010133task1.dao.BookMapper">
|
||||
<insert id="insertBook" parameterType="com.gezenghuang.springboot.comc202210010133task1.model.Books">
|
||||
INSERT INTO books (title, author, isbn) VALUES (#{book.title}, #{book.author}, #{book.isbn})
|
||||
</insert>
|
||||
<insert id="addBooks"></insert>
|
||||
|
||||
<select id="selectAllBooks" resultType="com.gezenghuang.springboot.comc202210010133task1.model.Books">
|
||||
SELECT * FROM books
|
||||
</select>
|
||||
|
||||
<select id="selectBookById" parameterType="int" resultType="com.gezenghuang.springboot.comc202210010133task1.model.Books">
|
||||
SELECT * FROM books WHERE id = #{id}
|
||||
</select>
|
||||
<select id="getAllBooks" resultType="com.gezenghuang.springboot.comc202210010133task1.model.Books"></select>
|
||||
|
||||
<update id="updateBook" parameterType="com.gezenghuang.springboot.comc202210010133task1.model.Books">
|
||||
UPDATE books SET title = #{book.title}, author = #{book.author}, isbn = #{book.isbn} WHERE id = #{book.id}
|
||||
</update>
|
||||
<update id="updateBooks"></update>
|
||||
|
||||
<delete id="deleteBook" parameterType="int">
|
||||
DELETE FROM books WHERE id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteBooks"></delete>
|
||||
</mapper>
|
|
@ -0,0 +1,11 @@
|
|||
<?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">
|
||||
|
||||
<mapper namespace="com.gezenghuang.springboot.comc202210010133task1.dao.UserMapper">
|
||||
<select id="getUser" parameterType="string" resultType="com.gezenghuang.springboot.comc202210010133task1.model.User">
|
||||
SELECT * FROM user WHERE username=#{username} AND password=#{password}
|
||||
</select>
|
||||
<insert id="addUser" parameterType="com.gezenghuang.springboot.comc202210010133task1.model.User">
|
||||
INSERT INTO user (username, password) VALUES (#{name}, #{password})
|
||||
</insert>
|
||||
</mapper>
|
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Add Book</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
label {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
input[type="text"], input[type="date"] {
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Add Book</h1>
|
||||
<form action="/books/addbookscommit" method="post">
|
||||
<label for="title">Title:</label>
|
||||
<input type="text" id="title" name="title" required>
|
||||
|
||||
<label for="author">Author:</label>
|
||||
<input type="text" id="author" name="author" required>
|
||||
|
||||
<label for="isbn">ISBN:</label>
|
||||
<input type="text" id="isbn" name="isbn" required>
|
||||
|
||||
<label for="publisher">Publisher:</label>
|
||||
<input type="text" id="publisher" name="publisher" required>
|
||||
|
||||
<label for="published_date">Published Date:</label>
|
||||
<input type="date" id="published_date" name="published_date" required>
|
||||
|
||||
<button type="submit">Add Book</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>作业</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
th, td {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Books List</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Title</th>
|
||||
<th>Author</th>
|
||||
<th>ISBN</th>
|
||||
<th>Publisher</th>
|
||||
<th>Published Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="book : ${booksList}">
|
||||
<td th:text="${book.id}"></td>
|
||||
<td th:text="${book.title}"></td>
|
||||
<td th:text="${book.author}"></td>
|
||||
<td th:text="${book.isbn}"></td>
|
||||
<td th:text="${book.publisher}"></td>
|
||||
<td th:text="${book.published_date}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Error</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
p {
|
||||
text-align: center;
|
||||
color: #ff0000;
|
||||
}
|
||||
a {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Error</h1>
|
||||
<p>An error occurred. Please try again later.</p>
|
||||
<a href="/">Return to Home</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登录失败</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
h1 {
|
||||
color: #ff0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>用户名或者密码输入错误</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登录</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
.login-form {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
width: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin-bottom: 20px;
|
||||
color: #333;
|
||||
}
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
input[type="submit"] {
|
||||
width: 100%;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type="submit"]:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
a {
|
||||
color: #007BFF;
|
||||
text-decoration: none;
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-form">
|
||||
<h1>用户登录界面</h1>
|
||||
<form action="/logincommit" method="post">
|
||||
<input type="text" name="username" placeholder="请输入用户名"></br>
|
||||
<input type="password" name="password" placeholder="请输入密码"></br>
|
||||
<input type="submit" value="登录"></input>
|
||||
</form>
|
||||
<a href="/registerpage">注册</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>注册页面</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
.register-form {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
width: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin-bottom: 20px;
|
||||
color: #333;
|
||||
}
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
input[type="submit"] {
|
||||
width: 100%;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type="submit"]:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="register-form">
|
||||
<h1>注册页面</h1>
|
||||
<form action="/registercommit" method="post">
|
||||
<input type="text" name="username" placeholder="请输入用户名"></br>
|
||||
<input type="password" name="password" placeholder="请输入密码"></br>
|
||||
<input type="submit" value="注册"></input>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Update Book</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
label {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
input[type="text"], input[type="date"] {
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Update Book</h1>
|
||||
<form action="/books/updatebookscommit" method="post">
|
||||
<input type="hidden" id="id" name="id" value="${books.id}" required>
|
||||
|
||||
<label for="title">Title:</label>
|
||||
<input type="text" id="title" name="title" value="${books.title}" required>
|
||||
|
||||
<label for="author">Author:</label>
|
||||
<input type="text" id="author" name="author" value="${books.author}" required>
|
||||
|
||||
<label for="isbn">ISBN:</label>
|
||||
<input type="text" id="isbn" name="isbn" value="${books.isbn}" required>
|
||||
|
||||
<label for="publisher">Publisher:</label>
|
||||
<input type="text" id="publisher" name="publisher" value="${books.publisher}" required>
|
||||
|
||||
<label for="published_date">Published Date:</label>
|
||||
<input type="date" id="published_date" name="published_date" value="${books.published_date}" required>
|
||||
|
||||
<button type="submit">Update Book</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
package com.gezenghuang.springboot.comc202210010133task1;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class ApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
|
||||
<localRepository>D:\repository\mavenrepository</localRepository>
|
||||
|
||||
<pluginGroups>
|
||||
|
||||
</pluginGroups>
|
||||
|
||||
|
||||
<proxies>
|
||||
<!-- proxy
|
||||
| Specification for one proxy, to be used in connecting to the network.
|
||||
|
|
||||
<proxy>
|
||||
<id>optional</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<username>proxyuser</username>
|
||||
<password>proxypass</password>
|
||||
<host>proxy.host.net</host>
|
||||
<port>80</port>
|
||||
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
|
||||
</proxy>
|
||||
-->
|
||||
</proxies>
|
||||
|
||||
<!-- servers
|
||||
| This is a list of authentication profiles, keyed by the server-id used within the system.
|
||||
| Authentication profiles can be used whenever maven must make a connection to a remote server.
|
||||
|-->
|
||||
<servers>
|
||||
<!-- server
|
||||
| Specifies the authentication information to use when connecting to a particular server, identified by
|
||||
| a unique name within the system (referred to by the 'id' attribute below).
|
||||
|
|
||||
| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
|
||||
| used together.
|
||||
|
|
||||
<server>
|
||||
<id>deploymentRepo</id>
|
||||
<username>repouser</username>
|
||||
<password>repopwd</password>
|
||||
</server>
|
||||
-->
|
||||
|
||||
<!-- Another sample, using keys to authenticate.
|
||||
<server>
|
||||
<id>siteServer</id>
|
||||
<privateKey>/path/to/private/key</privateKey>
|
||||
<passphrase>optional; leave empty if not used.</passphrase>
|
||||
</server>
|
||||
-->
|
||||
</servers>
|
||||
<mirrors>
|
||||
<mirror>
|
||||
<id>alimaven</id>
|
||||
<name>aliyun maven</name>
|
||||
<url>https://maven.aliyun.com/repository/central</url>
|
||||
<mirrorOf>central</mirrorOf>
|
||||
</mirror>
|
||||
</mirrors>
|
||||
|
||||
|
||||
<!-- profiles
|
||||
| This is a list of profiles which can be activated in a variety of ways, and which can modify
|
||||
| the build process. Profiles provided in the settings.xml are intended to provide local machine-
|
||||
| specific paths and repository locations which allow the build to work in the local environment.
|
||||
|
|
||||
| For example, if you have an integration testing plugin - like cactus - that needs to know where
|
||||
| your Tomcat instance is installed, you can provide a variable here such that the variable is
|
||||
| dereferenced during the build process to configure the cactus plugin.
|
||||
|
|
||||
| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
|
||||
| section of this document (settings.xml) - will be discussed later. Another way essentially
|
||||
| relies on the detection of a system property, either matching a particular value for the property,
|
||||
| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
|
||||
| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
|
||||
| Finally, the list of active profiles can be specified directly from the command line.
|
||||
|
|
||||
| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
|
||||
| repositories, plugin repositories, and free-form properties to be used as configuration
|
||||
| variables for plugins in the POM.
|
||||
|
|
||||
|-->
|
||||
<profiles>
|
||||
<!-- profile
|
||||
| Specifies a set of introductions to the build process, to be activated using one or more of the
|
||||
| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
|
||||
| or the command line, profiles have to have an ID that is unique.
|
||||
|
|
||||
| An encouraged best practice for profile identification is to use a consistent naming convention
|
||||
| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
|
||||
| This will make it more intuitive to understand what the set of introduced profiles is attempting
|
||||
| to accomplish, particularly when you only have a list of profile id's for debug.
|
||||
|
|
||||
| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
|
||||
<profile>
|
||||
<id>jdk-1.4</id>
|
||||
|
||||
<activation>
|
||||
<jdk>1.4</jdk>
|
||||
</activation>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jdk14</id>
|
||||
<name>Repository for JDK 1.4 builds</name>
|
||||
<url>http://www.myhost.com/maven/jdk14</url>
|
||||
<layout>default</layout>
|
||||
<snapshotPolicy>always</snapshotPolicy>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
</profile>
|
||||
-->
|
||||
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<activation>
|
||||
<jdk>18</jdk>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<maven.compiler.source>18</maven.compiler.source>
|
||||
<maven.compiler.target>18</maven.compiler.target>
|
||||
<maven.compiler.compilerVersion>18</maven.compiler.compilerVersion>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
| Here is another profile, activated by the system property 'target-env' with a value of 'dev',
|
||||
| which provides a specific path to the Tomcat instance. To use this, your plugin configuration
|
||||
| might hypothetically look like:
|
||||
|
|
||||
| ...
|
||||
| <plugin>
|
||||
| <groupId>org.myco.myplugins</groupId>
|
||||
| <artifactId>myplugin</artifactId>
|
||||
|
|
||||
| <configuration>
|
||||
| <tomcatLocation>${tomcatPath}</tomcatLocation>
|
||||
| </configuration>
|
||||
| </plugin>
|
||||
| ...
|
||||
|
|
||||
| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
|
||||
| anything, you could just leave off the <value/> inside the activation-property.
|
||||
|
|
||||
<profile>
|
||||
<id>env-dev</id>
|
||||
|
||||
<activation>
|
||||
<property>
|
||||
<name>target-env</name>
|
||||
<value>dev</value>
|
||||
</property>
|
||||
</activation>
|
||||
|
||||
<properties>
|
||||
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
|
||||
</properties>
|
||||
</profile>
|
||||
-->
|
||||
</profiles>
|
||||
|
||||
<!-- activeProfiles
|
||||
| List of profiles that are active for all builds.
|
||||
|
|
||||
<activeProfiles>
|
||||
<activeProfile>alwaysActiveProfile</activeProfile>
|
||||
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
|
||||
</activeProfiles>
|
||||
-->
|
||||
</settings>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="spring" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="646d4f53-d133-421b-b3b8-0e556dc905f8" name="更改" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/.gitignore" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/.mvn/wrapper/maven-wrapper.properties" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/mvnw" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/mvnw.cmd" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/pom.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Application.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Config/DataSourceConfig.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Config/MyBatis.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/controller/BooksController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/controller/TestController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/dao/BookMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/model/Books.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/model/User.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/BooksService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/UserService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/impl/BookServiceImpl.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/application.properties" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/mapper/BookMapper.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/addbooks.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/books.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/error.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/updatebooks.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/test/java/com/gezenghuang/springboot/comc202210010133task1/ApplicationTests.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../comc202210010133task2/src/main/java/com/gezenghuang/springboot/comc202210010133task2/testcontroller.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../comc202210010133task2/src/main/resources/templates/test.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/PersonController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/dao/PersonMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/model/Person.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/service/PersonService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/service/impl/PersonServiceImpl.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/mapper/PersonMapper.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/addpersonpage.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/personpage.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/updata.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/pom.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/src/main/java/com/gezenghuang/springboot/App.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/src/test/java/com/gezenghuang/springboot/AppTest.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../untitled5/.idea/uiDesigner.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../untitled5/.idea/vcs.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/JSONControllre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/JSONControllre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/Logincontrollre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/Logincontrollre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/Testcontrollre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/Testcontrollre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/model/User.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/resources/application.properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../untitled/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../untitled/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../untitled5/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../untitled5/.idea/encodings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../untitled5/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../untitled5/.idea/misc.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 5
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2mTvU97W5nkwpuviW7UaIDnm49U" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/32728/JavaEE/spring",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.17890.1" />
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.17890.1" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="646d4f53-d133-421b-b3b8-0e556dc905f8" name="更改" comment="" />
|
||||
<created>1727113393268</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1727113393268</updated>
|
||||
<workItem from="1727113394318" duration="76000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,17 @@
|
|||
<?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>
|
||||
|
||||
<groupId>com.gezenghuang.spring</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,17 @@
|
|||
<?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>
|
||||
|
||||
<groupId>com.gezenghuang.spring</groupId>
|
||||
<artifactId>untitled</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,17 @@
|
|||
package com.gezenghuang.spring;
|
||||
|
||||
//TIP 要<b>运行</b>代码,请按 <shortcut actionId="Run"/> 或
|
||||
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
//TIP 当文本光标位于高亮显示的文本处时按 <shortcut actionId="ShowIntentionActions"/>
|
||||
// 查看 IntelliJ IDEA 建议如何修正。
|
||||
System.out.printf("Hello and welcome!");
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
//TIP 按 <shortcut actionId="Debug"/> 开始调试代码。我们已经设置了一个 <icon src="AllIcons.Debugger.Db_set_breakpoint"/> 断点
|
||||
// 但您始终可以通过按 <shortcut actionId="ToggleLineBreakpoint"/> 添加更多断点。
|
||||
System.out.println("i = " + i);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
|
@ -0,0 +1,19 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
|
|
@ -0,0 +1,259 @@
|
|||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
|
||||
# MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
set -euf
|
||||
[ "${MVNW_VERBOSE-}" != debug ] || set -x
|
||||
|
||||
# OS specific support.
|
||||
native_path() { printf %s\\n "$1"; }
|
||||
case "$(uname)" in
|
||||
CYGWIN* | MINGW*)
|
||||
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
|
||||
native_path() { cygpath --path --windows "$1"; }
|
||||
;;
|
||||
esac
|
||||
|
||||
# set JAVACMD and JAVACCMD
|
||||
set_java_home() {
|
||||
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
|
||||
if [ -n "${JAVA_HOME-}" ]; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACCMD="$JAVA_HOME/jre/sh/javac"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACCMD="$JAVA_HOME/bin/javac"
|
||||
|
||||
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
|
||||
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
|
||||
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
JAVACMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v java
|
||||
)" || :
|
||||
JAVACCMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v javac
|
||||
)" || :
|
||||
|
||||
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
|
||||
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# hash string like Java String::hashCode
|
||||
hash_string() {
|
||||
str="${1:-}" h=0
|
||||
while [ -n "$str" ]; do
|
||||
char="${str%"${str#?}"}"
|
||||
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
|
||||
str="${str#?}"
|
||||
done
|
||||
printf %x\\n $h
|
||||
}
|
||||
|
||||
verbose() { :; }
|
||||
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
|
||||
|
||||
die() {
|
||||
printf %s\\n "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
trim() {
|
||||
# MWRAPPER-139:
|
||||
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
|
||||
# Needed for removing poorly interpreted newline sequences when running in more
|
||||
# exotic environments such as mingw bash on Windows.
|
||||
printf "%s" "${1}" | tr -d '[:space:]'
|
||||
}
|
||||
|
||||
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
|
||||
while IFS="=" read -r key value; do
|
||||
case "${key-}" in
|
||||
distributionUrl) distributionUrl=$(trim "${value-}") ;;
|
||||
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
|
||||
esac
|
||||
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
|
||||
case "${distributionUrl##*/}" in
|
||||
maven-mvnd-*bin.*)
|
||||
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
|
||||
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
|
||||
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
|
||||
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
|
||||
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
|
||||
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
|
||||
*)
|
||||
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
|
||||
distributionPlatform=linux-amd64
|
||||
;;
|
||||
esac
|
||||
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
|
||||
;;
|
||||
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
|
||||
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
|
||||
esac
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
distributionUrlNameMain="${distributionUrlName%.*}"
|
||||
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
|
||||
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
|
||||
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
|
||||
|
||||
exec_maven() {
|
||||
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
|
||||
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
|
||||
}
|
||||
|
||||
if [ -d "$MAVEN_HOME" ]; then
|
||||
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
exec_maven "$@"
|
||||
fi
|
||||
|
||||
case "${distributionUrl-}" in
|
||||
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
|
||||
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
|
||||
esac
|
||||
|
||||
# prepare tmp dir
|
||||
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
|
||||
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
|
||||
trap clean HUP INT TERM EXIT
|
||||
else
|
||||
die "cannot create temp dir"
|
||||
fi
|
||||
|
||||
mkdir -p -- "${MAVEN_HOME%/*}"
|
||||
|
||||
# Download and Install Apache Maven
|
||||
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
verbose "Downloading from: $distributionUrl"
|
||||
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
# select .zip or .tar.gz
|
||||
if ! command -v unzip >/dev/null; then
|
||||
distributionUrl="${distributionUrl%.zip}.tar.gz"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
fi
|
||||
|
||||
# verbose opt
|
||||
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
|
||||
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
|
||||
|
||||
# normalize http auth
|
||||
case "${MVNW_PASSWORD:+has-password}" in
|
||||
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
esac
|
||||
|
||||
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
|
||||
verbose "Found wget ... using wget"
|
||||
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
|
||||
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
|
||||
verbose "Found curl ... using curl"
|
||||
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
|
||||
elif set_java_home; then
|
||||
verbose "Falling back to use Java to download"
|
||||
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
|
||||
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
cat >"$javaSource" <<-END
|
||||
public class Downloader extends java.net.Authenticator
|
||||
{
|
||||
protected java.net.PasswordAuthentication getPasswordAuthentication()
|
||||
{
|
||||
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
|
||||
}
|
||||
public static void main( String[] args ) throws Exception
|
||||
{
|
||||
setDefault( new Downloader() );
|
||||
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
|
||||
}
|
||||
}
|
||||
END
|
||||
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
|
||||
verbose " - Compiling Downloader.java ..."
|
||||
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
|
||||
verbose " - Running Downloader.java ..."
|
||||
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
|
||||
fi
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
if [ -n "${distributionSha256Sum-}" ]; then
|
||||
distributionSha256Result=false
|
||||
if [ "$MVN_CMD" = mvnd.sh ]; then
|
||||
echo "Checksum validation is not supported for maven-mvnd." >&2
|
||||
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
elif command -v sha256sum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
elif command -v shasum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
else
|
||||
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
|
||||
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $distributionSha256Result = false ]; then
|
||||
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
|
||||
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# unzip and move
|
||||
if command -v unzip >/dev/null; then
|
||||
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
|
||||
else
|
||||
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
|
||||
fi
|
||||
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
|
||||
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
|
||||
|
||||
clean || :
|
||||
exec_maven "$@"
|
|
@ -0,0 +1,149 @@
|
|||
<# : batch portion
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@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
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||
@SET __MVNW_CMD__=
|
||||
@SET __MVNW_ERROR__=
|
||||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||
@SET PSModulePath=
|
||||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||
)
|
||||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||
@SET __MVNW_PSMODULEP_SAVE=
|
||||
@SET __MVNW_ARG0_NAME__=
|
||||
@SET MVNW_USERNAME=
|
||||
@SET MVNW_PASSWORD=
|
||||
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
|
||||
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||
@GOTO :EOF
|
||||
: end batch / begin powershell #>
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:MVNW_VERBOSE -eq "true") {
|
||||
$VerbosePreference = "Continue"
|
||||
}
|
||||
|
||||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||
if (!$distributionUrl) {
|
||||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||
}
|
||||
|
||||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||
"maven-mvnd-*" {
|
||||
$USE_MVND = $true
|
||||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||
$MVN_CMD = "mvnd.cmd"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$USE_MVND = $false
|
||||
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
if ($env:MVNW_REPOURL) {
|
||||
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
|
||||
}
|
||||
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
|
||||
if ($env:MAVEN_USER_HOME) {
|
||||
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
|
||||
}
|
||||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||
|
||||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
exit $?
|
||||
}
|
||||
|
||||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||
}
|
||||
|
||||
# prepare tmp dir
|
||||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||
trap {
|
||||
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||
|
||||
# Download and Install Apache Maven
|
||||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
Write-Verbose "Downloading from: $distributionUrl"
|
||||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||
}
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||
if ($distributionSha256Sum) {
|
||||
if ($USE_MVND) {
|
||||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||
}
|
||||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||
}
|
||||
}
|
||||
|
||||
# unzip and move
|
||||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||
try {
|
||||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||
} catch {
|
||||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||
Write-Error "fail to move MAVEN_HOME"
|
||||
}
|
||||
} finally {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
|
@ -8,9 +8,10 @@
|
|||
<version>3.3.3</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.liulingzhi.springboot</groupId>
|
||||
<groupId>com.gezenghuang.springboot</groupId>
|
||||
<artifactId>springboot</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>springboot</name>
|
||||
<description>springboot</description>
|
||||
<url/>
|
||||
|
@ -20,6 +21,9 @@
|
|||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<modules>
|
||||
<module>untitled1</module>
|
||||
</modules>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
|
@ -60,6 +64,17 @@
|
|||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.25</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
|
@ -1,4 +1,4 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,19 +1,19 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot.controller;
|
||||
|
||||
import com.gezenghuang.springboot.springboot.model.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class JSONController {
|
||||
// ResponseBody 返回结果转为json格式
|
||||
public class JSONControllre {
|
||||
//ResponseBody 返回结果为JSON格式(Spring)
|
||||
@ResponseBody
|
||||
@RequestMapping("/getUser")
|
||||
@RequestMapping("/getuser")
|
||||
public User test(){
|
||||
//返回json数据
|
||||
User user = new User();
|
||||
User user=new User();
|
||||
user.setId(1);
|
||||
user.setName("liulingzhi");
|
||||
user.setName("gezenghuang");
|
||||
user.setAge(18);
|
||||
return user;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
@ -10,40 +10,38 @@ import java.io.File;
|
|||
import java.util.UUID;
|
||||
|
||||
@Controller
|
||||
public class LoginController {
|
||||
public class Logincontrollre {
|
||||
|
||||
@RequestMapping("/uploadcommit")
|
||||
public String upload(MultipartFile file){
|
||||
public String uploadcommit(MultipartFile file){
|
||||
//保存文件
|
||||
File file1 = new File("D:/Desktop/素材");
|
||||
//随机数 不重复
|
||||
String filename = UUID.randomUUID() + file.getOriginalFilename();
|
||||
File file1 = new File("D:/葛增煌专用Word文档/");
|
||||
String filename = UUID.randomUUID().toString()+file.getOriginalFilename();
|
||||
try {
|
||||
file.transferTo(new File(file1,filename));
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "success.html";
|
||||
return "sucess.html";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/news/{newsid}")
|
||||
public String news(@PathVariable String newsid,Model model){
|
||||
model.addAttribute("newsid",newsid);
|
||||
return "news.html";
|
||||
}
|
||||
|
||||
@RequestMapping("/login")
|
||||
public String login(){
|
||||
return "login.html";
|
||||
}
|
||||
|
||||
@RequestMapping("/logincommit")
|
||||
public String logincommit(String username, String password, Model model){
|
||||
if (username.equals("admin")&&password.equals("123456")){
|
||||
model.addAttribute("username",username);
|
||||
public String logincommit(String username, String password, Model model) {
|
||||
if (username.equals("admin") && password.equals("123456")) {
|
||||
model.addAttribute("username", username);
|
||||
return "main.html";
|
||||
} else {
|
||||
return "fail.html";
|
||||
}
|
||||
return "fail.html";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.gezenghuang.springboot.springboot.controller;
|
||||
|
||||
import com.gezenghuang.springboot.springboot.model.Person;
|
||||
import com.gezenghuang.springboot.springboot.service.PersonService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class PersonController {
|
||||
@Autowired
|
||||
private PersonService personService;
|
||||
|
||||
@RequestMapping("/personpage")
|
||||
public String getAllPerson(Model model) {
|
||||
model.addAttribute("personList", personService.getAllPerson());
|
||||
return "personpage.html";
|
||||
}
|
||||
|
||||
//转发到添加页面
|
||||
@RequestMapping("/addpersonpage")
|
||||
public String addPerson(Model model) {
|
||||
return "addpersonpage.html";
|
||||
}
|
||||
|
||||
//提交请求
|
||||
@RequestMapping("/addpersoncommit")
|
||||
public String addPersoncommit(Person person) {
|
||||
personService.addPerson(person);
|
||||
return "redirect:/personpage";
|
||||
}
|
||||
|
||||
@RequestMapping("/deleteperson")
|
||||
public String deletePerson(int id) {
|
||||
personService.deletePerson(id);
|
||||
return "redirect:/personpage";
|
||||
}
|
||||
|
||||
@RequestMapping("/updatepersonpage")
|
||||
public String updatePersonPage(Person person, Model model) {
|
||||
model.addAttribute("person", person);
|
||||
return "updata.html";
|
||||
}
|
||||
|
||||
@RequestMapping("/updatepersoncommit")
|
||||
public String updatePersonCommit(Person person) {
|
||||
personService.updatePerson(person);
|
||||
return "redirect:/personpage";
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot.controller;
|
||||
|
||||
import com.gezenghuang.springboot.springboot.model.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -8,21 +9,22 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
public class TestController {
|
||||
public class Testcontrollre {
|
||||
@RequestMapping("/test")
|
||||
public String test(Model model){
|
||||
List<User> userList = new ArrayList<>();
|
||||
for (int i = 0; i < 5; i++){
|
||||
// 修正了 for 循环中的变量声明和初始化
|
||||
for (int i = 0; i < 10; i++) {
|
||||
User user = new User();
|
||||
user.setId(i);
|
||||
user.setName("liulingzhi"+i);
|
||||
user.setAge(18+i);
|
||||
user.setName("张三" + i);
|
||||
user.setAge(20 + i);
|
||||
userList.add(user);
|
||||
}
|
||||
|
||||
|
||||
model.addAttribute("userList",userList);
|
||||
model.addAttribute("name","Your Name");
|
||||
// 返回test.html 网页
|
||||
model.addAttribute("name","张三");
|
||||
return "test.html";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.gezenghuang.springboot.springboot.dao;
|
||||
|
||||
import com.gezenghuang.springboot.springboot.model.Person;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PersonMapper {
|
||||
public List<Person> getAllPerson();
|
||||
public int addPerson(Person person);
|
||||
public int deletePerson(int id);
|
||||
public int updatePerson(Person person);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.gezenghuang.springboot.springboot.model;
|
||||
|
||||
import lombok.Data;
|
||||
@Data
|
||||
|
||||
public class Person {
|
||||
private int id;
|
||||
private String name;
|
||||
private int age;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
//替代getter setter
|
||||
@Data
|
||||
//替代所有的成员变量set和get方法
|
||||
public class User {
|
||||
private int id;
|
||||
private String name;
|
|
@ -0,0 +1,12 @@
|
|||
package com.gezenghuang.springboot.springboot.service;
|
||||
|
||||
import com.gezenghuang.springboot.springboot.model.Person;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PersonService {
|
||||
public List<Person> getAllPerson();
|
||||
public int addPerson(Person person);
|
||||
public int deletePerson(int id);
|
||||
public int updatePerson(Person person);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.gezenghuang.springboot.springboot.service.impl;
|
||||
|
||||
|
||||
import com.gezenghuang.springboot.springboot.dao.PersonMapper;
|
||||
import com.gezenghuang.springboot.springboot.model.Person;
|
||||
import com.gezenghuang.springboot.springboot.service.PersonService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class PersonServiceImpl implements PersonService {
|
||||
@Autowired
|
||||
PersonMapper personMapper;
|
||||
|
||||
@Override
|
||||
public List<Person> getAllPerson() {
|
||||
return personMapper.getAllPerson();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addPerson(Person person) {
|
||||
return personMapper.addPerson(person);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deletePerson(int id) {
|
||||
return personMapper.deletePerson(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updatePerson(Person person) {
|
||||
return personMapper.updatePerson(person);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
spring.application.name=springboot
|
||||
server.port=8080
|
||||
spring.web.resources.static-locations=classpath:/img/,file:D/?????Word??/
|
||||
#???????
|
||||
# ??????
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
# ?????
|
||||
spring.datasource.name=defaultDataSource
|
||||
# ???????
|
||||
spring.datasource.url=jdbc:mysql://106.53.194.250:63306/mybatis202210010133?serverTimezone=UTC
|
||||
# ??????&???
|
||||
spring.datasource.username=202210010133
|
||||
spring.datasource.password=@hnucm1254
|
||||
#??????????MyBatis??
|
||||
#??Mybatis?Mapper??
|
||||
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||
#??Mybatis?????
|
||||
mybatis.type-aliases-package=com.gezenghuang.springboot.springboot.model
|
||||
#????
|
||||
logging.level.com.gezenghuang.springboot.springboot = debug
|
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
|
@ -0,0 +1,20 @@
|
|||
<?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">
|
||||
<mapper namespace="com.gezenghuang.springboot.springboot.dao.PersonMapper">
|
||||
<select id="getAllPerson" resultType="com.gezenghuang.springboot.springboot.model.Person">
|
||||
select * from person
|
||||
</select>
|
||||
|
||||
<insert id="addPerson" parameterType="com.gezenghuang.springboot.springboot.model.Person">
|
||||
insert into person(name,age) values(#{name},#{age})
|
||||
</insert>
|
||||
|
||||
<delete id="deletePerson" parameterType="int">
|
||||
delete from person where id=#{id}
|
||||
</delete>
|
||||
|
||||
<update id="updatePerson" parameterType="com.gezenghuang.springboot.springboot.model.Person">
|
||||
update person set name=#{name},age=#{age} where id=#{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>添加用户界面</h1>
|
||||
<form action="/addpersoncommit" method="post">
|
||||
<input type="text" name="name" placeholder="请输入用户名"></br>
|
||||
<input type="password" name="age" placeholder="请输入用户年龄"></br>
|
||||
<input type="submit" value="添加用户">
|
||||
</form>
|
||||
<a href="/personpage">返回用户界面</a>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,6 @@
|
|||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>登录失败</h1>
|
||||
|
||||
<h1>错误</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<!-- <style> body {-->
|
||||
<!-- font-family: Arial, sans-serif;-->
|
||||
<!-- background-color: #f4f4f4;-->
|
||||
<!-- display: flex;-->
|
||||
<!-- justify-content: center;-->
|
||||
<!-- align-items: center;-->
|
||||
<!-- height: 100vh;-->
|
||||
<!-- margin: 0;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- form {-->
|
||||
<!-- background-color: white;-->
|
||||
<!-- padding: 20px;-->
|
||||
<!-- border-radius: 8px;-->
|
||||
<!-- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);-->
|
||||
<!-- width: 300px;-->
|
||||
<!-- text-align: center;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="text"],-->
|
||||
<!-- input[type="password"] {-->
|
||||
<!-- width: 100%;-->
|
||||
<!-- padding: 10px;-->
|
||||
<!-- margin: 10px 0;-->
|
||||
<!-- border: 1px solid #ccc;-->
|
||||
<!-- border-radius: 4px;-->
|
||||
<!-- box-sizing: border-box;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="submit"] {-->
|
||||
<!-- width: 100%;-->
|
||||
<!-- padding: 10px;-->
|
||||
<!-- background-color: #4CAF50;-->
|
||||
<!-- color: white;-->
|
||||
<!-- border: none;-->
|
||||
<!-- border-radius: 4px;-->
|
||||
<!-- cursor: pointer;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="submit"]:hover {-->
|
||||
<!-- background-color: #45a049;-->
|
||||
<!-- }-->
|
||||
<!-- </style>-->
|
||||
</head>
|
||||
<body>
|
||||
<h1>登录界面</h1>
|
||||
|
||||
<form action="/uploadcommit" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" name="上传文件" >
|
||||
</form>
|
||||
</input>
|
||||
</input>
|
||||
|
||||
<img src="1.png" style="width: 100px;height: 100px">
|
||||
<form action="/logincommit" method="post">
|
||||
<input type="text" name="username" placeholder="用户名">
|
||||
<input type="password" name="password" placeholder="密码">
|
||||
<input type="submit" value="登录">
|
||||
</form>
|
||||
</input>
|
||||
</input>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,6 @@
|
|||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>上传成功!</h1>
|
||||
|
||||
<h1>主界面</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<!-- <style> body {-->
|
||||
<!-- font-family: Arial, sans-serif;-->
|
||||
<!-- background-color: #f4f4f4;-->
|
||||
<!-- display: flex;-->
|
||||
<!-- justify-content: center;-->
|
||||
<!-- align-items: center;-->
|
||||
<!-- height: 100vh;-->
|
||||
<!-- margin: 0;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- form {-->
|
||||
<!-- background-color: white;-->
|
||||
<!-- padding: 20px;-->
|
||||
<!-- border-radius: 8px;-->
|
||||
<!-- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);-->
|
||||
<!-- width: 300px;-->
|
||||
<!-- text-align: center;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="text"],-->
|
||||
<!-- input[type="password"] {-->
|
||||
<!-- width: 100%;-->
|
||||
<!-- padding: 10px;-->
|
||||
<!-- margin: 10px 0;-->
|
||||
<!-- border: 1px solid #ccc;-->
|
||||
<!-- border-radius: 4px;-->
|
||||
<!-- box-sizing: border-box;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="submit"] {-->
|
||||
<!-- width: 100%;-->
|
||||
<!-- padding: 10px;-->
|
||||
<!-- background-color: #4CAF50;-->
|
||||
<!-- color: white;-->
|
||||
<!-- border: none;-->
|
||||
<!-- border-radius: 4px;-->
|
||||
<!-- cursor: pointer;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- input[type="submit"]:hover {-->
|
||||
<!-- background-color: #45a049;-->
|
||||
<!-- }-->
|
||||
<!-- </style>-->
|
||||
</head>
|
||||
<body>
|
||||
<h1>新闻</h1>
|
||||
<div th:text="${newsid}">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Person列表界面</h1>
|
||||
<a href="/addpersonpage">添加用户</a>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>姓名</td>
|
||||
<td>年龄</td>
|
||||
<td>删除操作</td>
|
||||
<td>更新操作</td>
|
||||
</tr>
|
||||
<tr th:each="person:${personList}">
|
||||
<td th:text="${person.id}"></td>
|
||||
<td th:text="${person.name}"></td>
|
||||
<td th:text="${person.age}"></td>
|
||||
<td>
|
||||
<a th:href="'/deleteperson?id='+${person.id}" >删除</a>
|
||||
</td>
|
||||
<td>
|
||||
<a th:href="@{/updatepersonpage(id=${person.id},name=${person.name},age=${person.age})}">更新</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,6 @@
|
|||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>新闻页面</h1>
|
||||
<div th:text="${newsid}"></div>
|
||||
<h1>上传成功</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<style> table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>hello world!!</h1>
|
||||
<div
|
||||
th:text="${name}">
|
||||
</div>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>编号</td>
|
||||
<td>姓名</td>
|
||||
<td>年龄</td>
|
||||
</tr>
|
||||
<tr th:each="user:${userList}">
|
||||
<td th:text="${user.id}"></td>
|
||||
<td th:text="${user.name}"></td>
|
||||
<td th:text="${user.age}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>更新页面</h1>
|
||||
<a href="/personpage">返回</a>
|
||||
<div th:text="${person.id}"></div>
|
||||
<form action="/updatepersoncommit" method="post">
|
||||
<input type="text" name="id" th:value="${person.id}" placeholder="请输入id"><br>
|
||||
<input type="text" name="name" th:value="${person.name}"placeholder="请输入用户名"><br>
|
||||
<input type="text" name="age" th:value="${person.age}"placeholder="请输入年龄"><br>
|
||||
<input type="submit" value="提交"></br>
|
||||
</input>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
package com.liulingzhi.springboot.springboot;
|
||||
package com.gezenghuang.springboot.springboot;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
@ -0,0 +1,28 @@
|
|||
<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.gezenghuang.springboot</groupId>
|
||||
<artifactId>springboot</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>untitled1</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>untitled1</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
package com.gezenghuang.springboot;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.gezenghuang.springboot;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
spring.application.name=springboot
|
||||
#server.port=8080
|
||||
spring.web.resources.static-locations=classpath:/img/,file:D:/Desktop/??/
|
||||
spring.servlet.multipart.max-file-size=1024MB
|
||||
spronging.servlet.multipart.max-request-size=10240MB
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 MiB |
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>登录页面</h1>
|
||||
|
||||
<form action="/uploadcommit" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file" /></br>
|
||||
<input type="submit" value="上传文件"/>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<form action="/logincommit" method="post">
|
||||
<input type="text" name="username" placeholder="用户名"/></br>
|
||||
<input type="password" name="password" placeholder="密码"/></br>
|
||||
<input type="submit" value="登录"/>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<img src ="/01.png"style="width: 300px;height: 200px" />
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>主界面</h1>
|
||||
<p>欢迎您,[[${username}]]</p>
|
||||
<div th:text="${username}"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,23 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World 橘子牛牛牛</h1>
|
||||
<div th:text="${name}"> </div>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>id</td>
|
||||
<td>姓名</td>
|
||||
<td>年龄</td>
|
||||
</tr>
|
||||
<tr th:each="user:${userList}">
|
||||
<td th:text="${user.id}"></td>
|
||||
<td th:text="${user.name}"></td>
|
||||
<td th:text="${user.age}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="18" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="cd03845b-a679-4bf4-8ca5-b8b4a34baca6" name="更改" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/.gitignore" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/.mvn/wrapper/maven-wrapper.properties" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/mvnw" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/mvnw.cmd" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/pom.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Application.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Config/DataSourceConfig.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/Config/MyBatis.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/controller/BooksController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/controller/TestController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/dao/BookMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/model/Books.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/model/User.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/BooksService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/UserService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/service/impl/BookServiceImpl.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/application.properties" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/mapper/BookMapper.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/addbooks.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/books.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/error.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/main/resources/templates/updatebooks.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../com.c202210010133.task1/src/test/java/com/gezenghuang/springboot/comc202210010133task1/ApplicationTests.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../comc202210010133task2/src/main/java/com/gezenghuang/springboot/comc202210010133task2/testcontroller.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../comc202210010133task2/src/main/resources/templates/test.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/PersonController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/dao/PersonMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/model/Person.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/service/PersonService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/service/impl/PersonServiceImpl.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/mapper/PersonMapper.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/addpersonpage.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/personpage.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/src/main/resources/templates/updata.html" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/pom.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/src/main/java/com/gezenghuang/springboot/App.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../springboot/untitled1/src/test/java/com/gezenghuang/springboot/AppTest.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../untitled5/.idea/uiDesigner.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/../untitled5/.idea/vcs.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/JSONControllre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/JSONControllre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/Logincontrollre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/Logincontrollre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/Testcontrollre.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/controller/Testcontrollre.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/java/com/gezenghuang/springboot/springboot/model/User.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../springboot/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/../springboot/src/main/resources/application.properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../untitled5/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../untitled5/.idea/encodings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../untitled5/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../untitled5/.idea/misc.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="userSettingsFile" value="C:\Users\32728\JavaEE\settings.xml" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 6
|
||||
}</component>
|
||||
<component name="ProjectId" id="2lgeB8LLtEZTYyqc4bvWKJSkE3g" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/32728/JavaEE/untitled",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"onboarding.tips.debug.path": "C:/Users/32728/JavaEE/untitled/src/main/java/com/gezenghuang/spring/Main.java",
|
||||
"settings.editor.selected.configurable": "MavenSettings",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\32728\JavaEE" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.17890.1" />
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.17890.1" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="cd03845b-a679-4bf4-8ca5-b8b4a34baca6" name="更改" comment="" />
|
||||
<created>1725606010501</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1725606010501</updated>
|
||||
<workItem from="1725606011565" duration="496000" />
|
||||
<workItem from="1727113399422" duration="66000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/../com.c202210010133.task1/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/dao/112/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../comc202210010133task2/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../spring/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../spring/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../spring/untitled/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../spring/untitled/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../springboot/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../springboot/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../springboot/untitled1/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../spring/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../spring/untitled/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../springboot/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../com.c202210010133.task1/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/dao/112/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../comc202210010133task2/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/../com.c202210010133.task1/src/main/java/com/gezenghuang/springboot/comc202210010133task1/dao/112/pom.xml" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
<?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>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>untitled5</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>6.1.12</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,3 @@
|
|||
public class app{
|
||||
public
|
||||
}
|
Loading…
Reference in New Issue