简体   繁体   中英

What's the best way to init data for Java Rest API?

I am currently working on creating simple Rest API application with using Spring Boot. The topic that makes me think is data presentation. Last time when I was doing it (maybe two years ago) basing on Github API I've used low level mechanisms( reading data from Github API URI and streaming it with using BufferedReader onto string, which I have transformed with ObjectMapper . Although I can just add static data like using list.add() , I'm wondering what's the best way to make it happen.

Looking forward to hear!

With JSR-311 support of RESTful services was added to JavaEE. Also known as project Jersey, you can find many resources for that in the internet, eg at Oracle where you can find tutorials how to set up a RESTful service on the server side or how you can access resources as a client .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM