i want return simple html page controller, name of file not content. why?
this controller code:
@restcontroller public class homecontroller { @requestmapping("/") public string welcome() { return "login"; } } this project structure:
[
when using @restcontroller this:
@restcontroller public class homecontroller { @requestmapping("/") public string welcome() { return "login"; } } this same in normal controller:
@controller public class homecontroller { @requestmapping("/") @responsebody public string welcome() { return "login"; } } using @responsebody returns return "login"; string object. object return attached payload in http body json.
this why getting login in response.
Comments
Post a Comment