java - Response body is empty when using DeferredResult -


response body empty when using deferredresult java config.

controller:

@controller public class homecontroller {      @requestmapping("/")     public deferredresult<modelandview> home() {         final deferredresult<modelandview> result = new deferredresult<>();          timer timer = new timer();         timer.schedule(new timertask() {             @override             public void run() {                 result.setresult(new modelandview("home", collections.singletonmap("name", "world")));             }         }, 2);          return result;     } } 

configuration:

@configuration @componentscan(basepackages = "to.talk.gzip.test") @propertysource(value = "classpath:/application.properties") @enablewebmvc public class appconfig {      @bean     public viewresolver mustacheviewresolver() {         mustacheviewresolver resolver = new mustacheviewresolver();         resolver.setprefix("views/");         resolver.setsuffix(".html");         return resolver;     } } 

this seems bug in jetty 9. works jetty 8.

reported issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=408117


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -