-
spring MVC基本概念
查看全部 -
maven提供了坐標(biāo)的概念,唯一標(biāo)識查看全部
-
maven提供了坐標(biāo)的概念,唯一標(biāo)識查看全部
-
-servlet.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<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-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config></context:annotation-config>
<!-- 注解掃描 -->
<context:component-scan base-package="com.mvcdemo">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
<mvc:annotation-driven/>
? <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
? ? ? ? <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
? ? ? ? <property name="prefix" value="/WEB-INF/jsp/"/>
? ? ? ? <property name="suffix" value=".jsp"/>
? ? </bean> ?
</beans>
查看全部 -
@(RequestParam("courseId")) Integer courseId可以用來將請求URL中傳過來的參數(shù)綁定到controller具體方法的參數(shù)中
查看全部 -
將查詢得到的course放進model里面,然后在jsp頁面就可以使用${course.title}等方式訪問數(shù)據(jù)
查看全部 -
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
? <property name="maxUploadSize" value="209715200" />
? <property name="defaultEncoding" value="UTF-8" />
? <property name="resolveLazily" value="true" />
</bean>
查看全部 -
執(zhí)行鏈查看全部
-
執(zhí)行鏈查看全部
-
通過handlerAdapter來適配,去調(diào)controller查看全部
-
MVC就是通過dispatchServlet來實現(xiàn)前后端分離的,它也就是前端控制器查看全部
-
學(xué)習(xí)查看全部
-
%HOME%\.m2文件夾
就是用戶根目錄下的.m2目錄,不同系統(tǒng)可能不同,
win系統(tǒng)一般是在:C:\用戶\用戶名\.m2(可通過 ?點擊 開始-->運行,輸入一個 ".",進入home );mac系統(tǒng)一般在/Users/用戶名/.m2(可以通過終端 輸入 cd ~ ?來進入home);
另請注意,.m2這個目錄一般是隱藏的。
查看全部 -
Spring MVC基本概念查看全部
-
Spring MVC基本概念
查看全部
舉報