Получается ОШИБКА: java.sql.SQLSyntaxErrorException: у вас есть ошибка в синтаксисе SQL; проверьте руководство, соответствующее версии вашего сервера MySQL, чтобы найти правильный синтаксис для использования рядом с emp.employeeMangement.api.DTO.ResponseDTO(emp.empName,emp.gender,emp.email,emp в строке 1
@Query(value = "select NEW com.emp.employeeMangement.api.DTO.ResponseDTO(" +
`"emp.empName," +
"emp.gender," +
"emp.email," +
"emp.empCode," +
"att.noOfAbsent," +
"att.noOfPresent," +
"att.month," +
"att.noOfDaysInMonth," +
"sal.salAmount," +
"round(@per_day\\:=sal.salAmount/att.noOfDaysInMonth) as salperday," +
"round(att.noOfPresent*@per_day) as Salarycurrentmonth " +
") " +
"from Employee as emp " +
"join Attendence as att " +
"on emp.emp_id=att.cp_fk" +
" left join Salary as sal " +
"on sal.emp_id_fk=emp.emp_id",nativeQuery = true)
List getInfoInExcel();
Подробнее здесь: https://stackoverflow.com/questions/744 ... pring-boot