Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
stryter6246yYou can use Spring Boot which uses embedded tomcat by default. You can also swap out tomcat for jetty if you like.
-
donuts236726y@stryter so I can like annotate the classes and methods so it gets the query params and and just return objects which it will serialize automatically?
Guess will give it a try thanks. -
Rikan2836yAnother framework would be Dropwizard, you can use annotations path resolving and for your parameters.
-
stryter6246y@billgates absolutely. You actually have a variety of ways to tackle the problem you are describing with Spring (Boot).
I would highly recommend giving it a shot. You won't be disappointed :)
Related Rants
I need to write a standalone server in Java 1.7 and have it
-handle GET urls and map them to different classes/methods
-extract the query params and expose them to the method
-Can respond in JSON by serialising the POJO or a list of them
We have an existing server I think that uses JBoss but takes forever to start and uses a lot of memory.
I also wrote one before with just a (Grizzly?) HttpServer so had to manually implement the above as needed. Only needed it to do one thing so really just 1 path.
Similar situation this time but I'd prefer to not have to implement this stuff manually and need it to be a bit more flexible to extension.
question
server frameworks
java