0

I'm trying to clone the Hapi-fhir-jpaserver-starter project at the following URL and create an API with an MVC pattern, only 404 error occurs. I don't know why.

"https://github.com/hapifhir/hapi-fhir-jpaserver-starter"

I created a template file in the resources path and put an HTML file in it to create an API method that displays pages in the next class. But it only happens 404 errors. I don't know why.

When doing the same thing using the hapi-fhir-plain server-starter, the component-scan in the configuration file was modified and solved, but it did not work on the jpaserver-starter using the spring boot.

please help me ;<

package ca.uhn.fhir.jpa.starter.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/api")
public class ppcontroller {

    @GetMapping("/tnrcnl")
    public String x() {
        return "Hi";
    }
}

The following characters are printed to the console when sending a GET request

2023-07-26 17:28:38.354 [qtp1892336170-43] WARN  o.s.web.servlet.PageNotFound [DispatcherServlet.java:1283] No mapping for GET /api/tnrcnl
2023-07-26 17:28:38.360 [qtp1892336170-43] WARN  o.s.web.servlet.PageNotFound [DispatcherServlet.java:1283] No mapping for GET /error

enter image description here

Displaying the HTML page

천혁성
  • 1
  • 1

0 Answers0