課程
/后端開發(fā)
/Java
/使用SpringMVC+Spring+Hibernate開發(fā)人員信息管理功能
中間省略了很多配置的文件和jsp頁面,求代碼
2016-12-06
源自:使用SpringMVC+Spring+Hibernate開發(fā)人員信息管理功能 3-1
正在回答
<?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:aop="http://www.springframework.org/schema/aop" 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-4.2.xsd http://www.springframework.org/schema/aop?http://www.springframework.org/schema/aop/spring-aop-4.3.xsd http://www.springframework.org/schema/context?http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/mvc?http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd"> <!--?配置自動掃描的包?--> <context:component-scan?base-package="com.imooc"> <context:include-filter?type="annotation" expression="org.springframework.stereotype.Controller"?/> <context:exclude-filter?type="annotation" expression="org.springframework.stereotype.Service"?/> <context:exclude-filter?type="annotation" expression="org.springframework.stereotype.Repository"?/> </context:component-scan> <mvc:resources?location="/images/"?mapping="/images/**"?/> <mvc:resources?location="/js/"?mapping="/js/**"?/> <mvc:resources?location="/style/"?mapping="/style/**"?/> <mvc:resources?location="/img/"?mapping="/img/**"?/> <bean class="org.springframework.web.servlet.mvc.methdo.annotation.RequestMappingHandlerMapping"></bean> <bean class="org.springframework.web.servlet.mvc.methdo.annotation.RequestMappingHandlerAdapter"> <property?name="cacheSeconds"?value="0"?/> <property?name="messageConverters"> <list> <ref?bean="mappingJacksonHttpMessageConverter"?/> <ref?bean="mappingStringHttpMessageConverter"?/> </list> </property> <property?name="webBindInitializer"?ref="webBindInitializer"></property> </bean> <bean?id="mappingStringHttpMessageConverter" class="org.springframework.http.converter.StringHttpMessageConverter"> <property?name="supportedMediaTypes"> <list> <value>text/plain;charset=UTF-8</value> <value>application/json;charset=UTF-8</value> </list> </property> </bean> <bean?id="mappingJacksonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> <property?name="supportedMediaTypes"> <list> <bean?class="org.springframework.http.MediaType"> <constructor-arg?index="0"?value="application"></constructor-arg> <constructor-arg?index="1"?value="json"></constructor-arg> <constructor-arg?index="2"?value="UTF-8"></constructor-arg> </bean> </list> </property> </bean> <bean?id=""?webBindInitializer?" class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer"> <property?name="conversionService"> <bean class="org.springframework.core.convert.support.DefaultConversionService?/> </property> </bean> <!--?配置視圖解析器?如何把?handler?方法返回值解析為實際的物理視圖?--> <bean??id=" ViewResolver?" class="org.springframework.web.servlet.view.InternalResourceViewResolver?"> <property?name="ignoreAcceptHeader"?value="true"></property> <property?name="mediaTypes"> <map> <entry?key="json"?value="application/json"></entry> <entry?key="xml"?value="application/xml"></entry> </map> </property> <property?name="defaultContentType"?value="text/html"></property> <property?name="favorParameter"?value="false"></property> <property?name="ViewResolvers"> <list> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property?name="order"?value="2"?/> <property?name="prefix"?value="/WEB-INF/views/"?/> <property?name="suffix"?value=".jsp"?/> </bean> </list> </property> </bean> </beans>
Chen鎖 提問者
可參照這個源代碼https://github.com/GongchuangSu/HelloWeb
舉報
Java常用框架整合案例,通過本案例的學(xué)習(xí)還可以體會項目的實現(xiàn)流程
1 回答源碼沒有, 求源碼
1 回答源代碼呢..
2 回答源代碼下載
1 回答?源代碼在哪里?老師
3 回答有素材、源代碼的嗎?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-12-16
2016-12-14