spring mvc 请求报错

 No mapping found for HTTP request with URI [/Springmvc/test] in DispatcherServlet with dispatche

原因:表单有日期,实体对应字段也是日期类型,所以报错,把实体和库字段设置程String,就会成功保存。

ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customUseController': Unsatisfied dependency expressed through field 'customUseService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.huotu.scrm.service.service.customUse.CustomUseService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

 原因:serviceImpl继承service接口,应该在serviceImpl上面增加注解@Service,如下

@Service
@Transactional
public class CustomUseServiceImpl implements CustomUseService {

 

org.thymeleaf.exceptions.TemplateInputException

错误原因是each循环之后

  <tr th:each="customBrs,cusBrs:${customBRSPage}">
                        <th th:text="${customBrs.oddNum}"></th>
                        <th th:text="${customBrs.BRS007}"></th>
                        <th th:text="${customBrs.BRS003}"></th>
                        <th th:text="${customBrs.BRS004}"></th>
                        <th th:text="${customBrs.BRS005}"></th>
                        <th th:text="${customBrs.BRS006}"></th>
                        <th>
                            <div>
                                <input type="button" value="预览" class="btn-pre" onclick="pre(this)">
                                <input type="button" value="编辑" class="btn-pre" onclick="editBrs(this)">
                                <input type="button" value="删除" class="btn-pre" onclick="delBrs(this)">
                            </div>
                        </th>
                    </tr>

${customBrs.oddNum}
//写成
${cusBrs.oddNum}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值