Start state is missing. Add at least one state to the flow

springmvc配置过程中,会配置数据库文件,比如说如下文件;这个时候可能会出现“Start state is missing. Add at least one state to the flow”错误,解决方法是:

 

<?xmlversion="1.0"encoding="UTF-8"?>

<beansxmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

xmlns:p="http://www.springframework.org/schema/p"

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/beans 

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/context 

http://www.springframework.org/schema/context/spring-context-2.5.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-2.0.xsd

http://www.springframework.org/schema/tx

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

 

<context:component-scanbase-package="enterpriseinternalmanagement.">

<context:exclude-filtertype="annotation"expression="org.springframework.stereotype.Controller"/>

</context:component-scan>

 

<!-- 导入资源文件 -->

<context:property-placeholderlocation="classpath:jdbc.properties"/>

 

<!-- 连接数据库 -->

<beanclass="org.apache.commons.dbcp.BasicDataSource">

<propertyname="username"value="${user}"></property>

<propertyname="password"value="${password}"></property>

<propertyname="url"value="${jdbcUrl}"></property>

<propertyname="driverClassName"value="${driver}"></property>

<propertyname="initialSize"value="3"></property>

<propertyname="maxActive"value="80"></property>

 <propertyname="maxIdle"value="20"></property>

<propertyname="minIdle"value="2"></property>

 <propertyname="maxWait"value="3000"></property>

<propertyname="testOnBorrow"><value>true</value></property>

<propertyname="testWhileIdle"><value>true</value></property>

<propertyname="testOnReturn"><value>true</value></property>

<propertyname="removeAbandoned"><value>true</value></property>

<propertyname="removeAbandonedTimeout"><value>300</value></property>

<propertyname="logAbandoned"><value>true</value></property>

</bean>

</beans>

 

 

 

转载于:https://www.cnblogs.com/lixiuming521125/p/6441653.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值