I created a new micronaut app using mn create-app example.micronaut.complete
After that I opened the project using intellij and added a new class as TestController to the project with code below:
package example.micronaut;
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/hello")
public class TestController {
TestController(){}
@Get(value = "/", produces = MediaType.TEXT_PLAIN)
String getTest(){
return "some string";
}
}
But I am getting
{"_links":{"self":{"href":"/","templated":false}},"message":"Page Not Found"}
whenever I try to access the /hello end point
My application.yml looks like this:
micronaut:
application:
name: complete
server:
port: 8080