课题代码提交

This commit is contained in:
hezi66677 2024-11-10 19:13:44 +08:00
parent f730019c33
commit d93e44f786
7 changed files with 65 additions and 29 deletions

30
pom.xml
View File

@ -5,10 +5,10 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.3</version> <version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>com.xutianle.spring</groupId> <groupId>com.xutianle.springboot</groupId>
<artifactId>springboot</artifactId> <artifactId>springboot</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>springboot</name> <name>springboot</name>
@ -60,6 +60,32 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </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>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.7</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.7</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,5 +1,21 @@
spring.application.name=springboot spring.application.name=springboot
server.port=8080
spring.servlet.multipart.max-file-size=1000MB
spring.servlet.multipart.max-request-size=10000000MB
spring.web.resources.static-locations=classpath:/img/ spring.web.resources.static-locations=classpath:/img/
spring.servlet.multipart.max-request-size=100000MB
spring.serviet.multipart.max-file-size=100000MB
# ??????
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# ?????
spring.datasource.name=defaultDataSource
# ???????
spring.datasource.url=jdbc:mysql://10.33.66.120:3306/mybatis202201020128?serverTimezone=UTC
# ??????&???
spring.datasource.username=202201020128
spring.datasource.password=@hnucm1254
#??????????MyBatis??
#??Mybatis?Mapper??
mybatis-plus.mapper-locations=classpath:mapper/*.xml
#??Mybatis?????
mybatis-plus.type-aliases-package=com.xutianle.springboot.springboot.model;
logging.level.com.xutianle.springboot.springboot = debug

View File

@ -1,25 +1,21 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" xmlns="http://www.w3.org/1999/html">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Title</title> <title>Title</title>
</head> </head>
<body> <body>
<h1>登录界面</h1> <h1>登录界面</h1>
<!--<img src="/1.jpeg" style="height: 20px,width:20px">-->
<form action="/uploadcommit" method="post" enctype="multipart/form-data"> <form action="/uploadcommit" enctype="multipart/form-data" method="post">
<input type="file" name="file" /></br> <input type="file" name="file" ><br>
<input type="submit" value="上传文件"/> <input type="submit" value="上传图片"></input>
</form> </form>
<img src="/1.png" alt="" style="width: 100px; height: 100px">
<form action="/logincommit" method="post"> <form action="/logincommit" method="post">
<input type="text" name="username" placeholder="请输入用户名"/></br> <input type="text" name="username" placeholder="用户名"><br>
<input type="password" name="password" placeholder="请输入密码"/></br> <input type="password" name="password" placeholder="密码"><br>
<input type="submit" value="登录"/> <input type="submit" value="登录">
</form> </form>
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
<title>Title</title> <title>Title</title>
</head> </head>
<body> <body>
<h1>新闻页面</h1> <h1>新闻</h1>
<div th:text="${newsid}"></div> <div th:text="${newsid}"></div>
</body> </body>
</html> </html>

View File

@ -5,6 +5,6 @@
<title>Title</title> <title>Title</title>
</head> </head>
<body> <body>
<h1>上传成功</h1> <h1>登陆成功</h1>
</body> </body>
</html> </html>

View File

@ -5,20 +5,18 @@
<title>Title</title> <title>Title</title>
</head> </head>
<body> <body>
<h1>hello world!</h1> <h1>hello world!!1</h1>
<div th:text="${name}"></div>
<table border="1"> <table border="1">
<tr> <tr>
<td>id</td> <th>姓名</th>
<td>姓名</td> <th>年龄</th>
<td>年龄</td>
</tr> </tr>
<tr th:each="user:${userList}"> <tr th:each="user:${userList}">
<td th:text="${user.id}"></td>
<td th:text="${user.name}"></td> <td th:text="${user.name}"></td>
<td th:text="${user.age}"></td> <td th:text="${user.age}"></td>
</tr> </tr>
</table> </table>
<div th:text="${name}"></div>
</body> </body>
</html> </html>