commit
19837850be
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,13 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="Flowers-SpringMVCProject-2206 0 5:Web exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/Flowers_SpringMVCProject_2206_0_5_Web_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="Flowers-SpringMVCProject-2206 0 5/web/Web" />
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="Flowers-SpringMVCProject-2206 0 5" />
|
||||
</element>
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-context-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/servlet-api.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-beans-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-expression-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-webmvc-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/commons-logging-1.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-aop-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-web-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/spring-core-5.3.9.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/web/WEB-INF/lib/jsp-api.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,5 @@
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Flowers-SpringMVCProject-2206 0 5.iml" filepath="$PROJECT_DIR$/Flowers-SpringMVCProject-2206 0 5.iml" />
|
||||
</modules>
|
||||
</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="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
|
||||
</descriptors>
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/web" relative="/" />
|
||||
</webroots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="lib" level="project" />
|
||||
</component>
|
||||
</module>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示入门程序信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示Controller接收及响应数据</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
商品信息已在控制台输出!
|
||||
<%--<br>--%>
|
||||
<%--商品名称:${productInfo.pname}--%>
|
||||
<%--<br>--%>
|
||||
<%--是否热门:${productInfo.isHot}--%>
|
||||
<%--<br>--%>
|
||||
<%--市场价格:${productInfo.marketPrice}--%>
|
||||
<%--<br>--%>
|
||||
<%--销售价格:${productInfo.shopPrice}--%>
|
||||
<%--<br>--%>
|
||||
<%--商品图片:${productInfo.image}--%>
|
||||
<%--<br>--%>
|
||||
<%--分类名称:${productInfo.category.cname}--%>
|
||||
<%--<br>--%>
|
||||
<%--商品描述:${productInfo.pdesc}--%>
|
||||
<%--<br>--%>
|
||||
<%--上架日期:${productInfo.pdate}--%>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,16 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示花卉类目信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
类目编号:${itemCategoryInfo.id}
|
||||
<br>
|
||||
类目名称:${itemCategoryInfo.name}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 86178
|
||||
Date: 2025/3/31
|
||||
Time: 22:31
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>UserController</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
用户id:${printInfo.uid}
|
||||
<br>
|
||||
<br>
|
||||
用户名称:${printInfo.uname}
|
||||
<br>
|
||||
<br>
|
||||
用户电话:${printInfo.unumber}
|
||||
<br>
|
||||
<br>
|
||||
用户地址:${printInfo.uaddress}
|
||||
<br>
|
||||
<br>
|
||||
用户首次登录时间:${printInfo.udate}
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>添加花卉类目信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="itemCategory/add" method="post">
|
||||
类目编号:<input type="text" name="id">
|
||||
<br>
|
||||
类目名称:<input type="text" name="name">
|
||||
<br>
|
||||
<input type="submit" value="添加">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 86178
|
||||
Date: 2025/3/31
|
||||
Time: 22:04
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>添加用户</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="nihao/User" method="post">
|
||||
<tr>
|
||||
<td>用户id</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uid" placeholder="请输入用户id"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户姓名</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uname" placeholder="请输入用户姓名"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户号码</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="unumber" placeholder="请输入用户电话号码"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户地址</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uaddress" placeholder="请输入用户地址"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>登录日期</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="udate" placeholder="请输入登陆日期"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input type="reset" value="重置信息"></td>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<input type="submit" value="添加">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,13 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>入门程序</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="hello">hello world</a>
|
||||
<a href="addUser.jsp">addUser.jsp</a>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: bd
|
||||
Date: 2025/3/27
|
||||
Time: 23:30
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>入门程序</title>
|
||||
</head>
|
||||
<body>
|
||||
success!
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,19 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import com.ssm.entity.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
//请求处理器
|
||||
@Controller
|
||||
@RequestMapping("nihao")
|
||||
public class UserController {
|
||||
@RequestMapping("User")
|
||||
public ModelAndView test(User user){
|
||||
user.printInfo();
|
||||
System.out.println("用户信息:"+user.toString());
|
||||
ModelAndView mv = new ModelAndView("showUser");
|
||||
mv.addObject("printInfo", user);
|
||||
return mv;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class User {
|
||||
private Integer uid;//用户id
|
||||
private String uname;//用户名称
|
||||
private String unumber;//用户电话
|
||||
private String uaddress;//用户地址
|
||||
@DateTimeFormat(pattern = "yyyy-mm-dd")//用户首次登录日期
|
||||
private Date udate;
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public void setUname(String uname) {
|
||||
this.uname = uname;
|
||||
}
|
||||
|
||||
public String getUnumber() {
|
||||
return unumber;
|
||||
}
|
||||
|
||||
public void setUnumber(String unumber) {
|
||||
this.unumber = unumber;
|
||||
}
|
||||
|
||||
public String getUaddress() {
|
||||
return uaddress;
|
||||
}
|
||||
|
||||
public void setUaddress(String uaddress) {
|
||||
this.uaddress = uaddress;
|
||||
}
|
||||
|
||||
public Date getUdate() {
|
||||
return udate;
|
||||
}
|
||||
|
||||
public void setUdate(Date udate) {
|
||||
this.udate = udate;
|
||||
}
|
||||
public void printInfo(){
|
||||
System.out.println("用户id="+uid +"\n用户名称="+uname+"\n用户电话="+unumber+"\n用户地址="+uaddress+"\n用户首次登录日期="+udate);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 86178
|
||||
Date: 2025/3/31
|
||||
Time: 22:31
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>UserController</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
用户id:${printInfo.uid}
|
||||
<br>
|
||||
<br>
|
||||
用户名称:${printInfo.uname}
|
||||
<br>
|
||||
<br>
|
||||
用户电话:${printInfo.unumber}
|
||||
<br>
|
||||
<br>
|
||||
用户地址:${printInfo.uaddress}
|
||||
<br>
|
||||
<br>
|
||||
用户首次登录时间:${printInfo.udate}
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 86178
|
||||
Date: 2025/3/31
|
||||
Time: 22:04
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>添加用户</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="nihao/User" method="post">
|
||||
<tr>
|
||||
<td>用户id</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uid" placeholder="请输入用户id"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户姓名</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uname" placeholder="请输入用户姓名"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户号码</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="unumber" placeholder="请输入用户电话号码"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户地址</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="uaddress" placeholder="请输入用户地址"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>登录日期</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="udate" placeholder="请输入登陆日期"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input type="reset" value="重置信息"></td>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<input type="submit" value="添加">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue