java - Rest API call with Spring -


i faced problem while trying access basic rest api i've created. famous 404 error when type http://localhost:8080/projectname/rest/hello , can see in code snippet below, expect "hello world" string response. think missing configuration there..

any advice appreciated

@controller @jsonignoreproperties(ignoreunknown=true) @requestmapping("/rest")  public class entitycontroller {      @requestmapping(value="/hello" , method=requestmethod.get , produces=mediatype.text_plain_value)      public @responsebody string hello() {         return "hello world";     } } 

you don't need expose "application name", try make request for:

http://localhost:8080/rest/hello


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -