zoukankan      html  css  js  c++  java
  • spring的扫描配置

    <!-- 自动注册并检查@Required,@Autowired的属性注入 -->
        <context:component-scan base-package="com.xzm"></context:component-scan>
        <!-- 配置C3P0数据源 -->
        <context:property-placeholder ignore-resource-not-found="true" location="classpath*:com/xzm/config/spring/db.properties" />
        <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
        <property name="driverClass" value="${c3p0.mysql.driverClass}" />
        <property name="jdbcUrl" value="${c3p0.jdbcUrl}" />
        <property name="user" value="${c3p0.user}" />
        <property name="password" value="${c3p0.password}" />
        <property name="minPoolSize" value="${c3p0.minPoolSize}" />
        <property name="maxPoolSize" value="${c3p0.maxPoolSize}" />
        <property name="initialPoolSize" value="${c3p0.initialPoolSize}" />
        <property name="acquireIncrement" value="${c3p0.acquireIncrement}" />
        <property name="acquireRetryAttempts" value="${c3p0.acquireRetryAttempts}" />
        <property name="maxIdleTime" value="${c3p0.maxIdleTime}" />
        </bean>


    SpringMVC

    <!-- 自动扫描包下@Controller -->
        <context:component-scan base-package="com.xzm"></context:component-scan>
        <!-- 添加注解支持 -->
        <mvc:annotation-driven />
        
        <context:annotation-config />  
        
        <!-- 定义JSP文件的位置 -->  
        <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="prefix" value="/WEB-INF/views/"/>
            <property name="suffix" value=".jsp"/>
        </bean>
  • 相关阅读:
    python 图片验证码降噪
    python 视频配音、剪辑
    Python实现音乐的剪辑
    OpenCV-Python 视频读取
    OpenCV-Python 人脸眼睛嘴识别
    OpenCV-Python 人脸识别
    numpy
    python学习笔记(3)---cookie & session
    python爬虫学习笔记(2)-----代理模式
    python爬虫学习笔记(1)
  • 原文地址:https://www.cnblogs.com/xuzhenmin/p/3480033.html
Copyright © 2011-2022 走看看