Easiest frameworks to implement Java REST web services in 2014 -
Many structures have grown up on the JVM platform and in my opinion there is something dirty that I was involved in some J2EEE projects Almost many configuration files were in the form of source code files, of course, anybody can argue that the developer is always there, but I prefer framework and tools with a clear structure and maybe some limitations, to ensure that Everyone has the same style and architecture Uses art
What is the best framework for implementing the framework of server REST + in Java? I'm struggling to make the solution easier to use.
Jerseys and restlets look like good options, but I have read the old thread before learning, to make sure that there is nothing important new tools?
I want to create a simple rest api (for android) and website
Update 2017-01-26: Two years later, I can accept the spring with confidence What I wanted to do is boot The purpose of the spring boot is to make it easy to create spring-powered, production-class applications and services with minimal fuss. It takes an ideological view of the spring platform so that new and existing users can quickly get the bits they want. You can use it to create Java applications that can be used to start using the name "Java". Or more traditional war deployment. We also provide a command line tool that runs Spring scripts. The picture below shows the spring boot as a focus on the large spring ecosystem. It presents a small surface area for exposure and removal of value from the rest of the spring: Spring boot in context Spring The primary goals of boot are: "Getting Started" to make the fundamentally fast and widely accessible Spring does not boot code is absolutely no need to generate and XML configuration. play! Framework is another option. If an application adheres to the main principles of the main design, then the application is tragic. The Play Framework makes silk applications easy to build: Play Router interprets both URI and HTTP methods to route a Java call request. Regular expression-based URI patterns give you more flexibility. Protocol is stateless. This means that you can save any condition on the server between two consecutive requests. Play is considered as a key feature, so with this setting, you get full usage of HTP information. For example: example)
public class StoryController {public static result all the stories () {List & lt; Story & gt; Stories = New model.funders & lt; String, Story & gt; (String class, story class) .all (); Return Results (Jason. Tojson (Stories)); } Public Static Result GetStory (String Story Edgy) (Story Story = New Model.Funder & quot; String, Story> (String.class, Story.class) .byId (storyId); if (story == zero) { Return result. Notfond ("No story was found with the story");} Return result. (Jason. Tojson (story));}
Comments
Post a Comment