json - Creating simple REST webservice on Eclipse -



json - Creating simple REST webservice on Eclipse -

i trying start simple web service next illustration : https://spring.io/guides/gs/rest-service/

i unable response when nail service url. way trying run running project on apache web server eclipse. controller:

package com.nscm.controller; import org.springframework.web.bind.annotation.requestmapping; import org.springframework.web.bind.annotation.restcontroller; import com.nscm.model.user; @restcontroller public class nscmcontroller { @requestmapping("/getuser") public user getuser() { system.out.println("nscmcontroller.getuser()"); homecoming new user(); } }

this service class:

package com.nscm.service; import org.springframework.boot.autoconfigure.enableautoconfiguration; import org.springframework.boot.springapplication; import org.springframework.context.annotation.componentscan; @componentscan("com") @enableautoconfiguration public class application { public static void main(string[] args) { system.out.println("application.main()"); springapplication.run(application.class, args); } }

even though illustration mentions web.xml , spring.xml not required, after placing these, code not work. none of sops called when nail url. please help me if missing here.

json eclipse spring apache web-services

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -