SSM Applicationcontent.xml

Source: Internet
Author: User

1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Beansxmlns= "Http://www.springframework.org/schema/beans"3 Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"Xmlns:context= "Http://www.springframework.org/schema/context"4 XMLNS:AOP= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"Xmlns:tx= "Http://www.springframework.org/schema/tx"5 Xmlns:mvc= "Http://www.springframework.org/schema/mvc"6 xsi:schemalocation="7 Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans-3.0.xsd8 Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/ Spring-context-3.0.xsd9 HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/spring-aop-3.0.xsdTen http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd One Http://www.springframework.org/schema/mvc A http://www.springframework.org/schema/mvc/spring-mvc.xsd "> -  -  the      <Mvc:annotation-driven/>   -     <!--open Scan, scan all configuration files, except for controller annotations - -     <Context:component-scanBase-package= "Com.jlncrm"> -     </Context:component-scan> +  -     <!--The following is a full annotated configuration of Spring MVC + spring - +  A     <!--all of Spring MVC configurations - at     <Bean -         class= "Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" /> -     <Bean -         class= "Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" /> -  -     <Mvc:default-servlet-handler/> in         <!--Static resource processing - -     <mvc:resourcesMapping= "/static/**" Location= "/web-inf/static/" /> to  +     <!--The default view resolver is used when parsing errors on top (HTML is used by default)- - -     <BeanID= "Defaultviewresolver" the class= "Org.springframework.web.servlet.view.InternalResourceViewResolver"> *         < Propertyname= "Viewclass" $ value= "Org.springframework.web.servlet.view.JstlView" />Panax Notoginseng         < Propertyname= "ContentType"value= "text/html" /> -         < Propertyname= "prefix"value= "/web-inf/jsp/" /> the         < Propertyname= "suffix"value= ". jsp" /> +     </Bean> A  the     <!--The following is a full annotated configuration of Spring + MyBatis - +  -     <Tx:annotation-drivenTransaction-manager= "Txmanager" /> $  $     <!--Registration Transaction Management - -     <BeanID= "Txmanager" - class= "Org.springframework.jdbc.datasource.DataSourceTransactionManager"> the         < Propertyname= "DataSource"ref= "DataSource" /> -     </Bean>Wuyi  the     <!--defining DBCP Data Sources - -     <BeanID= "DataSource"class= "Org.apache.commons.dbcp.BasicDataSource"> Wu         <!--specifying the JDBC driver class - -         < Propertyname= "Driverclassname"value= "Com.mysql.jdbc.Driver"> About         </ Property> $         <!--provide the URL address of the connection database - -         < Propertyname= "url"value= "Jdbc:mysql://localhost:3306/crm"> -         </ Property> -         <!--provide the user name and password to connect to the database - A         < Propertyname= "username"value= "root"></ Property> +         < Propertyname= "Password"value= "123456"></ Property> the     </Bean> -  $     <BeanID= "Sqlsessionfactory"class= "Org.mybatis.spring.SqlSessionFactoryBean"> the         < Propertyname= "DataSource"ref= "DataSource" /> the         < Propertyname= "Mapperlocations"value= "Classpath*:mapper/*mapper.xml" /> the     </Bean> the     <Beanclass= "Org.mybatis.spring.mapper.MapperScannerConfigurer"> -         < Propertyname= "Basepackage"value= "com" /> in         < Propertyname= "Annotationclass"value= "Org.springframework.stereotype.Repository"></ Property> the     </Bean> the  About </Beans>

SSM Applicationcontent.xml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.