I've recently read an article regarding Dropwizard performance: https://nbsoftsolutions.com/blog/turning-dropwizard-performance-up-to-eleven.html
i've tried to convert a demo code i have to this configuration but without success. i'm having problems regarding getting attributes from request this is my code (main application):
environment.getObjectMapper();
final MyResource resource = new MyResource();
ServletContextHandler handler = new ServletContextHandler();
handler.setContextPath("/test/{test}");
final TestGetJsonServlet servlet = new TestGetJsonServlet(environment.getObjectMapper().getFactory());
environment.getApplicationContext().addServlet(new ServletHolder(servlet), "/test/*");
final FilterHolder holder = new FilterHolder(SimpleFilter.class);
environment.getApplicationContext().addFilter(holder, "/test*", EnumSet.allOf(DispatcherType.class));
environment.jersey().register(resource);
environment.jersey().register(JerseyFilter.class);
How do I configure it correctly to read also attributes?
Another small question is regarding filters. I want a filter for the specific servlet, how do I make it in the configuration? or even more specific, let's say I have doGet and doPost in my servlet, I want the filter to work only on the doPost, what do I need to change in my application's run method.
thanks for your help!