ssm整合常见错误

不想你离开。 提交于 2019-11-30 18:38:20

(1)

<form action="/account/save" method="post">
            名字 <input type="text" name="name"><br>
            金额 <input type="text" name="menoy"><br>
                  <input type="button" value="保存"> <br>
        </form>
        <form action="account/save" method="post">
            姓名:<input type="text" name="name" /><br/>
            金额:<input type="text" name="menoy" /><br/>
            <input type="submit" value="保存"/><br/>
        </form>

*表单 action属性路径错误"/account/save"      "account/save"

*错误提示:点击提交按钮无响应

(2)sql语句出错:

 

Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: 

 

 

 

500内部错误

(3)spring与mybatis整合路径错误

 

 Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'iAcconyDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.li.dao.IAcconyDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

 

 

 

 

<!--配置AccountDao接口所在包-->
    <bean id="mapperScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="cn.li.dao"/>
    </bean>


<!--配置AccountDao接口所在包-->
    <bean id="mapperScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="cn.li.dao.IAccountDao"/>
    </bean>

 *需要配置包,结果配置为类全名称

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!