spring注解

来源:互联网 发布:腾讯视频for mac官方 编辑:程序博客网 时间:2024/06/06 05:44

先加上这个:

<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:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/aop 
            http://www.springframework.org/schema/aop/spring-aop.xsd
            http://www.springframework.org/schema/tx 

            http://www.springframework.org/schema/tx/spring-tx.xsd">


再加上:<context:component-scan base-package="com.xll">
                </context:component-scan>


不是mvc版的

0 0