小编Gon*_*alo的帖子

未找到 MyBatis 参数

我正在尝试调用休息应用程序,但出现 500 错误。问题可能出在 MyBatis 调用上,但仍然无法解决。

这就是我称之为 MyBatis 执行的地方

@Override
public List<IdentitatBDTO> searchIdentitatsRepresentantsByRelacioIdentitatRepresentat(final String representatIdentificador, final Date dateFi) {

    List<Identitat> identitats = myBatisTemplate.execute(RelacioDao.class, new MyBatisDaoCallback<List<Identitat>>() {
        @Override
        public List<Identitat> execute(MyBatisDao dao) {
            return ((RelacioDao) dao).searchIdentitatsRepresentantsByRelacioIdentitatRepresentat(representatIdentificador, dateFi);
        }
    });
Run Code Online (Sandbox Code Playgroud)

我得到的错误是

{
"errorUrl": 
 "http://localhost:8080/idjrepresentaciorest/rest/representacio/representants/12340002L",
  "errorMessage": "\r\n### Error querying database.  Cause: org.apache.ibatis.binding.BindingException: Parameter 'representatIdentificador' not found. Available parameters are [1, 0, param1, param2]\r\n### Cause: org.apache.ibatis.binding.BindingException: Parameter 'representatIdentificador' not found. Available parameters are [1, 0, param1, param2]",
  "errorStackTrace": "org.apache.ibatis.exceptions.PersistenceException: \r\n### Error querying database.  Cause: org.apache.ibatis.binding.BindingException: …
Run Code Online (Sandbox Code Playgroud)

java spring-mybatis

3
推荐指数
1
解决办法
1万
查看次数

如何显示反应式表单验证错误消息

大家好,

我正在努力为名称输入制作验证器,我只是从 angular wiki 回复了代码,但仍然无法正常工作。

你能帮我找出问题吗?

谢谢指教。

我的 HTML 代码:

  <form [formGroup]="formAlta" (ngSubmit)="addRepresentacio()">
            <div class="form-group">
              <label for="namePro">Nom</label>
              <input id="namePro" class="form-control" formControlName="namePro" placeholder="Nom del professional" required>
              <div *ngIf="namePro.invalid && (namePro.dirty || namePro.touched)" class="alert alert-danger form-danger" role="alert">

        <div *ngIf="namePro.errors.required">
            El Nom del professional es obligatori
        </div>
    </div></form>
Run Code Online (Sandbox Code Playgroud)

还有我的 TS 组件

 formAlta: FormGroup;
 ngOnInit() {
    this.formAlta = new FormGroup({
      idPro: new FormControl(),
      documentTypePro: new FormControl(),
      namePro: new FormControl('',[Validators.required]),
      rProfessional: new FormControl(this.tipusPro),
      firstSurnamePro: new FormControl(),
      secondSurnamePro: new FormControl(),
      businessNamePro: new FormControl(),
      idCli: new FormControl(), …
Run Code Online (Sandbox Code Playgroud)

typescript angular angular-reactive-forms angular5

1
推荐指数
1
解决办法
1万
查看次数