我正在 Angular 7 上设置表单,每次输入正确的字段(姓名、电子邮件和电话)时都会出现此错误。然后我点击按钮createEmployee。通常它会转到下一页,但这次没有,它显示了这个错误。
这是 html 组件:
<div class="container custom-container">
<div class="col-md-12">
<h3 class="mb-3 text-center">Create Employee</h3>
<form [formGroup]="employeeDetails" (ngSubmit)="addEmployee()">
<div class="form-group">
<label>Name</label>
<input type="text" formControlName="name"
[(ngModel)]="employeeDetails.name" class = "form-control" [ngClass]="{
'is-invalid': submitted && f.name.errors }">
<div *ngIf="submitted && f.name.errors" class="invalid-feedback">
<div *ngIf="f.name.errors.required">Name is required
</div>
</div>
</div>
<div class="form-group">
<label>Email</label>
<input type="text" formControlName="email"
[(ngModel)]="employeeDetails.email" class="form-control" [ngClass]="{
'is-invalid': submitted && f.email.errors }" />
<div *ngIf="submitted && f.email.errors" class="invalid-feedback">
<div *ngIf="f.email.errors.required">Email is required</div>
<div *ngIf="f.email.errors.email">Email must be a valid email …Run Code Online (Sandbox Code Playgroud) 我是 Spring Batch 的初学者,我用它开发了一个简单的项目。我收到错误。
Description:
Field job in com.example.demo.DemoApplication required a bean of type
'org.springframework.batch.core.Job' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.batch.core.Job' in your
configuration.
Run Code Online (Sandbox Code Playgroud)
这是我的代码,我只有一个类:
Description:
Field job in com.example.demo.DemoApplication required a bean of type
'org.springframework.batch.core.Job' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.batch.core.Job' in your
configuration.
Run Code Online (Sandbox Code Playgroud)
感谢您帮助我找到此错误的主要原因