From c17f1b755146c082150476ae78c7c7361dbd61ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AE=80=20=E5=90=B4=E5=85=8B?= <3031873370@qq.com> Date: Mon, 20 Oct 2025 19:18:27 +0800 Subject: [PATCH] web --- .idea/artifacts/unnamed.xml | 6 +- .idea/compiler.xml | 14 ++ .idea/copilot.data.migration.agent.xml | 6 + .idea/copilot.data.migration.ask.xml | 6 + .idea/copilot.data.migration.ask2agent.xml | 6 + .idea/copilot.data.migration.edit.xml | 6 + .idea/jarRepositories.xml | 25 +++ .../javax_servlet_api_4_0_1_javadoc.xml | 9 -- .idea/libraries/mysql_connector_j_9_4_0.xml | 9 ++ .idea/libraries/servlet_api.xml | 9 ++ .idea/misc.xml | 12 +- .idea/modules.xml | 8 - .idea/uiDesigner.xml | 124 ++++++++++++++ src/Dockerfile => Dockerfile | 2 +- Web.iml | 14 +- pom.xml | 123 ++++++++++++++ .../java/houduan/Config/DataSourceConfig.java | 35 ++++ .../Controller/PrieviousController.java | 18 +++ .../Controller/RegisterController.java | 65 ++++++++ .../houduan/Controller/SignInController.java | 47 ++++++ src/main/java/houduan/DAO/JdbcUserDao.java | 75 +++++++++ src/main/java/houduan/DAO/UserDAO.java | 17 ++ src/main/java/houduan/DatabaseUtil.java | 46 ++++++ src/main/java/houduan/Object/User.java | 31 ++++ .../java/houduan/Service/UserService.java | 36 +++++ src/main/resources/applicationContext.xml | 14 ++ src/main/resources/database.properties | 4 + src/main/webapp/WEB-INF/springmvc.xml | 52 ++++++ src/main/webapp/WEB-INF/templates/index.html | 12 ++ src/main/webapp/WEB-INF/web.xml | 38 +++-- src/main/webapp/index.html | 152 ++++++++++++++++-- 31 files changed, 960 insertions(+), 61 deletions(-) create mode 100644 .idea/compiler.xml create mode 100644 .idea/copilot.data.migration.agent.xml create mode 100644 .idea/copilot.data.migration.ask.xml create mode 100644 .idea/copilot.data.migration.ask2agent.xml create mode 100644 .idea/copilot.data.migration.edit.xml create mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/libraries/javax_servlet_api_4_0_1_javadoc.xml create mode 100644 .idea/libraries/mysql_connector_j_9_4_0.xml create mode 100644 .idea/libraries/servlet_api.xml delete mode 100644 .idea/modules.xml create mode 100644 .idea/uiDesigner.xml rename src/Dockerfile => Dockerfile (91%) create mode 100644 pom.xml create mode 100644 src/main/java/houduan/Config/DataSourceConfig.java create mode 100644 src/main/java/houduan/Controller/PrieviousController.java create mode 100644 src/main/java/houduan/Controller/RegisterController.java create mode 100644 src/main/java/houduan/Controller/SignInController.java create mode 100644 src/main/java/houduan/DAO/JdbcUserDao.java create mode 100644 src/main/java/houduan/DAO/UserDAO.java create mode 100644 src/main/java/houduan/DatabaseUtil.java create mode 100644 src/main/java/houduan/Object/User.java create mode 100644 src/main/java/houduan/Service/UserService.java create mode 100644 src/main/resources/applicationContext.xml create mode 100644 src/main/resources/database.properties create mode 100644 src/main/webapp/WEB-INF/springmvc.xml create mode 100644 src/main/webapp/WEB-INF/templates/index.html diff --git a/.idea/artifacts/unnamed.xml b/.idea/artifacts/unnamed.xml index 515ea64..ff0c786 100644 --- a/.idea/artifacts/unnamed.xml +++ b/.idea/artifacts/unnamed.xml @@ -1,8 +1,8 @@ - - $PROJECT_DIR$/out/artifacts/unnamed + + $PROJECT_DIR$/src/main/webapp/WEB-INF/classes - + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..4b9c22b --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml new file mode 100644 index 0000000..4ea72a9 --- /dev/null +++ b/.idea/copilot.data.migration.agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml new file mode 100644 index 0000000..7ef04e2 --- /dev/null +++ b/.idea/copilot.data.migration.ask.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml new file mode 100644 index 0000000..1f2ea11 --- /dev/null +++ b/.idea/copilot.data.migration.ask2agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml new file mode 100644 index 0000000..8648f94 --- /dev/null +++ b/.idea/copilot.data.migration.edit.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..e5981b2 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/javax_servlet_api_4_0_1_javadoc.xml b/.idea/libraries/javax_servlet_api_4_0_1_javadoc.xml deleted file mode 100644 index 5298af7..0000000 --- a/.idea/libraries/javax_servlet_api_4_0_1_javadoc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/mysql_connector_j_9_4_0.xml b/.idea/libraries/mysql_connector_j_9_4_0.xml new file mode 100644 index 0000000..398b272 --- /dev/null +++ b/.idea/libraries/mysql_connector_j_9_4_0.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/servlet_api.xml b/.idea/libraries/servlet_api.xml new file mode 100644 index 0000000..4f035f1 --- /dev/null +++ b/.idea/libraries/servlet_api.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 454992c..0564fa2 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,14 @@ - - + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index c18517a..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Dockerfile b/Dockerfile similarity index 91% rename from src/Dockerfile rename to Dockerfile index 35d212f..169686e 100644 --- a/src/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM tomcat:9-jdk24-openjdk +FROM tomcat:9-jdk8-openjdk # 第二步:将本地webapp目录复制到容器内的Tomcat默认应用目录 # 注意:`src/main/webapp` 是你项目中Web资源的路径(需与实际一致) diff --git a/Web.iml b/Web.iml index 8585a8a..e756d63 100644 --- a/Web.iml +++ b/Web.iml @@ -1,18 +1,8 @@ - - - - - - - - - + + - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..794e427 --- /dev/null +++ b/pom.xml @@ -0,0 +1,123 @@ + + + 4.0.0 + + + com.Web + Web-project + 1.0-SNAPSHOT + war + Web + 基于Spring的Web项目(Java 24.0.2) + + + + + com.google.protobuf + protobuf-java + 4.28.2 + + + + org.springframework + spring-context + 6.1.0 + + + + org.springframework + spring-webmvc + 6.1.0 + + + + org.springframework + spring-jdbc + 6.1.0 + + + + org.thymeleaf + thymeleaf + 3.1.3.RELEASE + + + + org.thymeleaf + thymeleaf-spring6 + 3.1.3.RELEASE + + + com.fasterxml.jackson.core + jackson-databind + 2.15.2 + + + + jakarta.servlet + jakarta.servlet-api + 6.1.0 + provided + + + + + com.mysql + mysql-connector-j + 8.4.0 + + + + com.zaxxer + HikariCP + 5.0.1 + + + + + commons-logging + commons-logging + 1.2 + + + + org.slf4j + slf4j-api + 2.0.9 + + + ch.qos.logback + logback-classic + 1.4.11 + + + + + + Web + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 17 + UTF-8 + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + + false + + + + + diff --git a/src/main/java/houduan/Config/DataSourceConfig.java b/src/main/java/houduan/Config/DataSourceConfig.java new file mode 100644 index 0000000..0aba9fc --- /dev/null +++ b/src/main/java/houduan/Config/DataSourceConfig.java @@ -0,0 +1,35 @@ +package houduan.Config; + +import com.zaxxer.hikari.HikariDataSource; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.sql.DataSource; + +@Configuration +public class DataSourceConfig { + + @Bean(destroyMethod = "close") + public DataSource dataSource() { + HikariDataSource dataSource = new HikariDataSource(); + dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); + // 数据库连接信息 + dataSource.setJdbcUrl("jdbc:mysql://172.23.72.17:3306/DBMAIN?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC"); + dataSource.setUsername("Me"); + dataSource.setPassword("@Leiwei88"); + + // 连接池参数 + dataSource.setMaximumPoolSize(10); + dataSource.setMinimumIdle(5); + dataSource.setConnectionTimeout(30000); + dataSource.setIdleTimeout(600000); + + return dataSource; + } + + @Bean + public JdbcTemplate jdbcTemplate(DataSource dataSource) { + return new JdbcTemplate(dataSource); + } +} \ No newline at end of file diff --git a/src/main/java/houduan/Controller/PrieviousController.java b/src/main/java/houduan/Controller/PrieviousController.java new file mode 100644 index 0000000..1e392f8 --- /dev/null +++ b/src/main/java/houduan/Controller/PrieviousController.java @@ -0,0 +1,18 @@ +package houduan.Controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class PrieviousController { + + // 访问路径:http://localhost:8080/test + @GetMapping("/test") + public String test(Model model) { + // 向模型中添加数据(key为"message",value为"Hello Thymeleaf!") + model.addAttribute("message", "Hello Thymeleaf!"); + // 返回视图名:对应 /WEB-INF/templates/index.html + return "index"; + } +} \ No newline at end of file diff --git a/src/main/java/houduan/Controller/RegisterController.java b/src/main/java/houduan/Controller/RegisterController.java new file mode 100644 index 0000000..a06057b --- /dev/null +++ b/src/main/java/houduan/Controller/RegisterController.java @@ -0,0 +1,65 @@ +package houduan.Controller; + + +import houduan.Object.User; +import houduan.Service.UserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RequestMethod; // 修正导入 +import org.springframework.web.bind.annotation.RequestParam; +import java.sql.SQLException; + +@Controller +public class RegisterController{ + private static final Logger logger = LoggerFactory.getLogger(RegisterController.class); + + // 使用构造器注入,避免 IDE 报警并更利于测试 + private final UserService userService; + + @Autowired + public RegisterController(UserService userService) { + this.userService = userService; + } + @RequestMapping(value = "/RegisterServlet", method = RequestMethod.POST) // 修正引用 + @ResponseBody //响应体 + public String register(@RequestParam(value = "username", required = false) String username, + @RequestParam(value = "realName", required = false) String realName, + @RequestParam(value="password", required = false) String password, // 密码参数接收 + @RequestParam(value = "age", required = false) String ageStr) { + + // 2. 还是原来的参数校验 + if (username == null || username.trim().isEmpty()) { + return "username_empty"; + } + if (realName == null || realName.trim().isEmpty()) { + return "realname_empty"; + } + int age; + try { + age = ageStr != null && !ageStr.isEmpty() ? Integer.parseInt(ageStr) : 0; + if (age < 0 || age > 150) { + return "age_invalid_range"; + } + } catch (NumberFormatException e) { + return "age_invalid_format"; + } + + // 3. 调用 UserService 处理业务(原来的逻辑移到 service 里了) + User user = new User(username, realName, password, age); // 创建用户对象 + try { + if(userService.register(user)) { + return "success"; + } else { + return "username_exists"; + } + /*TODO: 要返回success和fail*/ + } catch (SQLException e) { + logger.error("Database error when registering user {}", username, e); + return "db_error"; + } + } +} diff --git a/src/main/java/houduan/Controller/SignInController.java b/src/main/java/houduan/Controller/SignInController.java new file mode 100644 index 0000000..425bf57 --- /dev/null +++ b/src/main/java/houduan/Controller/SignInController.java @@ -0,0 +1,47 @@ +package houduan.Controller; + +import houduan.Object.User; +import houduan.Service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.sql.SQLException; + +@Controller +public class SignInController { + private final UserService userService; + + @Autowired + public SignInController(UserService userService) { + this.userService = userService; + } + + @RequestMapping(value = "/SignServlet", method = RequestMethod.POST) // 修正引用 + @ResponseBody //响应体 + public Object SignIn(@RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password) throws SQLException { + + try{ + + if(userService.login(username,password)!=null){ + User user=userService.login(username,password); + return user; + } else { + return "invalid_credentials"; + } + + }catch(Exception e){ + e.printStackTrace(); + return "error"; + } + + + } +} + + + diff --git a/src/main/java/houduan/DAO/JdbcUserDao.java b/src/main/java/houduan/DAO/JdbcUserDao.java new file mode 100644 index 0000000..f6a4b31 --- /dev/null +++ b/src/main/java/houduan/DAO/JdbcUserDao.java @@ -0,0 +1,75 @@ +package houduan.DAO; + + + +import houduan.Object.User; +import houduan.DAO.UserDAO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import javax.sql.DataSource; +import java.sql.SQLException; +@Repository +// DAO 实现类:用 JdbcTemplate 实现数据库操作 +public class JdbcUserDao implements UserDAO { + + // 注入 Spring 管理的 JdbcTemplate(后续在 XML 中配置) + @Autowired + private JdbcTemplate jdbcTemplate; + private DataSource dataSource; + + private User temp; + + public User getTemp() { + return temp; + } + // 实现“用户名是否存在”查询 + @Override + public boolean existsByUsername(String username) throws SQLException { + String sql = "SELECT COUNT(1) FROM User_table WHERE username = ?"; + // 用 JdbcTemplate 执行查询,返回结果(1 表示存在,0 表示不存在) + Integer count = jdbcTemplate.queryForObject(sql, Integer.class, username); + return count != null && count > 0; + } + + // 实现“插入用户”操作 + @Override + public boolean insert(User user) throws SQLException { + String sql = "INSERT INTO User_table (username, real_name, age) VALUES (?, ?, ?,?)"; + // 用 JdbcTemplate 执行更新,返回影响行数 + int rows = jdbcTemplate.update(sql, + user.getUsername(), + user.getRealName(), + user.getPassword(), + user.getAge()); + return rows > 0; + } + + @Override + public boolean SelectDatabaseUser(String username, String password) throws SQLException { + try{ + String sqlg = "SELECT * FROM User_table WHERE username = ? AND password = ?"; + String sqlc= "SELECT COUNT(1) FROM User_table WHERE username = ? AND password = ?"; + Integer count = jdbcTemplate.queryForObject(sqlc, Integer.class, username, password); + if(count != null && count > 0){ + jdbcTemplate.queryForObject(sqlg, (rs, rowNum) -> { + temp=new User( + rs.getString("username"), + rs.getString("real_name"), + rs.getString("password"), + rs.getInt("age") + ); + return temp; + }, username, password); + return true; + } + temp=null; + return false; + }catch (Exception e){ + e.printStackTrace(); + return false; + } + + } +} \ No newline at end of file diff --git a/src/main/java/houduan/DAO/UserDAO.java b/src/main/java/houduan/DAO/UserDAO.java new file mode 100644 index 0000000..bfe4143 --- /dev/null +++ b/src/main/java/houduan/DAO/UserDAO.java @@ -0,0 +1,17 @@ +package houduan.DAO; + + +import houduan.Object.User; +import java.sql.SQLException; + +// DAO 接口:定义用户相关的数据库操作(只声明方法,不写实现) +public interface UserDAO { + // 1. 查:用户名是否存在 + boolean existsByUsername(String username) throws SQLException; + + // 2. 增:插入新用户 + boolean insert(User user) throws SQLException; + + boolean SelectDatabaseUser(String username, String password) throws SQLException; + // 后续可添加其他操作(如查用户、更新用户等) +} \ No newline at end of file diff --git a/src/main/java/houduan/DatabaseUtil.java b/src/main/java/houduan/DatabaseUtil.java new file mode 100644 index 0000000..762f7b6 --- /dev/null +++ b/src/main/java/houduan/DatabaseUtil.java @@ -0,0 +1,46 @@ +package houduan; + +import java.io.InputStream; +import java.sql.*; +import java.util.Properties; + +public class DatabaseUtil { + private static String driver; + private static String url; + private static String username; + private static String password; + + // 静态代码块:加载配置 + 注册驱动 + static { + try (InputStream is = DatabaseUtil.class.getClassLoader().getResourceAsStream("database.properties")) { + if (is == null) { + throw new RuntimeException("找不到 database.properties 配置文件"); + } + Properties prop = new Properties(); + prop.load(is); + driver = prop.getProperty("jdbc.driver"); + url = prop.getProperty("jdbc.url"); + username = prop.getProperty("jdbc.username"); + password = prop.getProperty("jdbc.password"); + Class.forName(driver); // 注册 JDBC 驱动 + } catch (Exception e) { + e.printStackTrace(); + } + } + + // 获取数据库连接 + public static Connection getConnection() throws SQLException { + return DriverManager.getConnection(url, username, password); + } + + // 关闭资源 + public static void close(Connection conn, PreparedStatement pstmt, ResultSet rs) { + try { + if (rs != null) rs.close(); + if (pstmt != null) pstmt.close(); + if (conn != null) conn.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src/main/java/houduan/Object/User.java b/src/main/java/houduan/Object/User.java new file mode 100644 index 0000000..17f055a --- /dev/null +++ b/src/main/java/houduan/Object/User.java @@ -0,0 +1,31 @@ +package houduan.Object; + +public class User { + private String username; + private String realName; + private String password; + private int age; + + public User(String username, String realName, String password,int age) { + this.username = username; + this.realName = realName; + this.password=password; + this.age = age; + } + + // Getter + Setter + public String getUsername() { return username; } + public void setUsername(String username) { this.username = username; } + public String getRealName() { return realName; } + public void setRealName(String realName) { this.realName = realName; } + public int getAge() { return age; } + public void setAge(int age) { this.age = age; } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} \ No newline at end of file diff --git a/src/main/java/houduan/Service/UserService.java b/src/main/java/houduan/Service/UserService.java new file mode 100644 index 0000000..aecaf50 --- /dev/null +++ b/src/main/java/houduan/Service/UserService.java @@ -0,0 +1,36 @@ +package houduan.Service; + +import houduan.DAO.JdbcUserDao; +import houduan.DatabaseUtil; +import houduan.Object.User; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +@Service +// 业务类:专门处理用户相关业务(注册、登录等) +public class UserService { + + @Autowired + private JdbcUserDao userDao; + + public boolean register(User user) throws SQLException { + if (userDao.existsByUsername(user.getUsername())) { + return false; + } + + return userDao.insert(user); + } + + public User login(String username, String password) throws SQLException { + if(userDao.SelectDatabaseUser(username, password)) { + return userDao.getTemp(); + } else { + return null; + } + } + +} \ No newline at end of file diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml new file mode 100644 index 0000000..5b3023f --- /dev/null +++ b/src/main/resources/applicationContext.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/database.properties b/src/main/resources/database.properties new file mode 100644 index 0000000..19f7acb --- /dev/null +++ b/src/main/resources/database.properties @@ -0,0 +1,4 @@ +jdbc.driver=com.mysql.cj.jdbc.Driver +jdbc.url=jdbc:mysql://8.137.94.229:3306/DBMAIN?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC +jdbc.username=Me +jdbc.password=@Leiwei88 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/springmvc.xml b/src/main/webapp/WEB-INF/springmvc.xml new file mode 100644 index 0000000..fc298dd --- /dev/null +++ b/src/main/webapp/WEB-INF/springmvc.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/index.html b/src/main/webapp/WEB-INF/templates/index.html new file mode 100644 index 0000000..e0a8c69 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/index.html @@ -0,0 +1,12 @@ + + + + + + Thymeleaf Test + + + +

默认文本(当模板未被解析时显示)

+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 7e11522..059190c 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,15 +1,25 @@ - + - xss - - index.html - index.htm - index.jsp - default.html - default.htm - default.jsp - - \ No newline at end of file + xsi:schemaLocation="http://jakarta.ee/xml/ns/jakartaee + http://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" + version="6.0"> + + + + dispatcher + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/springmvc.xml + + 1 + + + + dispatcher + / + + + + diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 7fc5314..54ff541 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -2,20 +2,148 @@ + - Document + login_or_sign + + -

冬夜读书示子堇

-
-

[宋] 陆游

-

- 古人学问无一例 -
- 少壮工夫老式成 -
- 纸上得来终觉浅 -
绝知此事要躬行 -

+ +
+ + +
+ +
+
+
+
+
+
+ + * +
+ +
+

+ + 账户名已存在 +

+
+
+ + * +
+ +
+

+ + 账户名已存在 +

+
+
+ + * +
+ +
+

+ + 密码未输入 +

+
+
+ + * +
+ +
+

+ + 两次输入密码不一致 +

+
+
+ + +
+ +
+

+ + 年龄数值范围错误 +

+
+ +
+ +
+ +
+
+
+ +
+
+ + + + + \ No newline at end of file