search

Home  >  Q&A  >  body text

java - spring boot可以作为app后端接口吗

spring boot可以作为app后端接口吗

巴扎黑巴扎黑2802 days ago748

reply all(5)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:50:01

    Yes, all you need to do is basically SpringMVC configuration, @ResponseBody annotation, and specify the produce parameter to @RequestMapping as application/json. The return value of such a method will be serialized into JSON.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:50:01

    Yes, you can use restful in combination with springmvc, or you can use Jersey, resteasy, etc. I wrote one some time ago, you can refer to it. https://github.com/jcalaz/xma...

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:50:01

    To add, if the interface purely returns json type data, just use restcontrol directly

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:50:01

    Yes, the APP backend usually returns restful-style Json data, http://www.roncoo.com/article... This is the simplest RESTfull API project built using spring boot. You can refer to it.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:50:01

    It must be possible~ All are restful interfaces. At most, the interface developed based on spring-boot can be connected to an API gateway.

    reply
    0
  • Cancelreply