main
刘思晗 2 weeks ago
parent 8d1cb6c28b
commit babd1b752c

@ -0,0 +1,13 @@
<component name="ArtifactManager">
<artifact type="exploded-war" name="grademanagement-SpringMVCProject:Web exploded">
<output-path>$PROJECT_DIR$/out/artifacts/grademanagement_SpringMVCProject_Web_exploded</output-path>
<root id="root">
<element id="javaee-facet-resources" facet="grademanagement-SpringMVCProject/web/Web" />
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
<element id="module-output" name="grademanagement-SpringMVCProject" />
</element>
</element>
</root>
</artifact>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="com.springsource.org.aopalliance-1.0.0">
<CLASSES>
<root url="jar://$PROJECT_DIR$/grademanagement-SpringProject/src/libs/com.springsource.org.aopalliance-1.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="com.springsource.org.aspectj.weaver-1.6.8.RELEASE">
<CLASSES>
<root url="jar://$PROJECT_DIR$/grademanagement-SpringProject/src/libs/com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="commons-logging-1.1.1 (3)">
<CLASSES>
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/commons-logging-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="spring-aop-5.1.6.RELEASE (2)">
<CLASSES>
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-aop-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-beans-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-context-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-core-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-expression-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-web-5.1.6.RELEASE.jar!/" />
<root url="jar://$PROJECT_DIR$/grademanagement-SpringMVCProject/web/WEB-INF/lib/spring-webmvc-5.1.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -1,5 +1,17 @@
<?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$">
@ -7,5 +19,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="commons-logging-1.1.1 (3)" level="project" />
<orderEntry type="library" name="spring-aop-5.1.6.RELEASE (2)" level="project" />
</component>
</module>

@ -0,0 +1,15 @@
//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);
}
}
}

@ -1,5 +1,12 @@
package com.ssm.controller;
public class FirstController {
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
}
@Controller
public class FirstController {
@RequestMapping("hello")
public String hello() {
return "showFirst";
}
}

@ -0,0 +1,14 @@
package com.ssm.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("testRM")
public class TestRequestMappingController {
@RequestMapping("onClass")
public String onClass(){
return "showRequestMapping";
}
}

@ -2,8 +2,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool.xsd http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd">
</beans>
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!--配置扫描注解包-->
<context:component-scan base-package="com.ssm.controller"></context:component-scan>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!--配置了一个前提-->
<property name="prefix" value="/WEB-INF/view/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
</beans>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: Lenovo
Date: 2026/4/22
Time: 19:15
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>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: HP
Date: 2026/4/25
Time: 11:00
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Test RequestMapping!</title>
</head>
<body>
Success!
</body>
</html>

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>grademanagement-SpringMVCProject</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<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">
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!--配置DispatcherServlet的初始化参数-->
<init-param>
<!--指定SpringMVC配置文件位置-->
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<!--配置DispatcherServlet的创建时刻是在web工程启动时创建而不是在调用时创建-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<!-- 映射路径 -->
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: DELL
Date: 2026/4/23
Time: 21:38
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>入门程序</title>
</head>
<body>
<a href="hello">hello world</a >
</body>
</html>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: HP
Date: 2026/4/25
Time: 10:54
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Test RequestMapping!</title>
</head>
<body>
<a href="testRM/onClass">1.Test RequestMapping可以标识在类的前面</a >
</body>
</html>
Loading…
Cancel
Save