this is the error that i'm getting just when i'm taking input from a HTML FORM and hitting submit.
here's my controller file:
package com.employee.employeesystem.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import com.employee.employeesystem.entity.Employee;
import com.employee.employeesystem.service.cycleService;
@Controller
public class empController {
private cycleService service;
@GetMapping("/")
public String home() {
return "index";
}
@GetMapping("/addcycle")
public String addCycleForm() {
return "Add_cycle";
}
@PostMapping("/register")
public String cycleRegister(@ModelAttribute Employee e) {
System.out.println(e);
service.addCycle(e);
return "redirect:/";
}
}