Im trying to call restapi and im getting error
package czajka.piotr.restapi.viewcontroller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class FieldViewController { @RequestMapping("/view-fields") public String viewFields() { return "view-fields"; } } org.thymeleaf.exceptions.TemplateInputException: Error resolving template [view-fields], template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:366) ~[thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:190) ~[thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1400) ~ etc
properties
spring.jpa.hibernate.ddl-auto=none spring.datasource.url=jdbc:mysql://localhost:3306/serverdb?useUnicode=true&serverTimezone=UTC spring.datasource.username=root spring.datasource.password=12345678 spring.datasource.driver-class-name=com.mysql.jdbc.Driver server.port=8081 spring.thymeleaf.prefix=classpath:templates/ spring.thymeleaf.suffix=.html spring.thymeleaf.mode=HTML5
templates/view-fields.htmlon your classpath ?