Quantcast
Channel: zeroturnaround.com » All Posts
Viewing all articles
Browse latest Browse all 2540

Reloading a Spring Controller not working properly on 7.0

$
0
0

Consider I have this:

@Controller
@Scope("request")
class TicketRelationshipController {
    @PostMapping("/ticket-relationship")
    def ticketRelationShipSearch(@ModelAttribute("type") String type,
                                 @ModelAttribute("openDate1") String openDate1,
                                 @ModelAttribute("openDate2") String openDate2,
                                 Model model) {
        println("something")

        (...irrelevant code...)
    }
}

I get the expected output:
something

Now I changed the code to:
println(“something new!”)

JRebel reloads it:

2016-11-16 13:15:58 JRebel: Reloading class 'com.ultraip.intranet.thymeleaf.TicketRelationshipController'.
2016-11-16 13:15:58 JRebel: Reinitialized class 'com.ultraip.intranet.thymeleaf.TicketRelationshipController$$EnhancerBySpringCGLIB$$2e9ccb9a'.

But then I lose the controller completely and receive a 404 error…

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Nov 16 13:16:47 BRST 2016
There was an unexpected error (type=Not Found, status=404).
No message available
2016-11-16 13:16:46 JRebel: Reconfiguring bean 'ticketRelationshipController' [com.ultraip.intranet.thymeleaf.TicketRelationshipController$$EnhancerBySpringCGLIB$$2e9ccb9a]
2016-11-16 13:16:46 JRebel: Reconfiguring bean 'ticketRelationshipController' [com.ultraip.intranet.thymeleaf.TicketRelationshipController$$EnhancerBySpringCGLIB$$2e9ccb9a]
2016-11-16 13:16:46 JRebel: Reconfiguring bean 'ticketRelationshipController' [com.ultraip.intranet.thymeleaf.TicketRelationshipController$$EnhancerBySpringCGLIB$$2e9ccb9a]
2016-11-16 13:16:46 JRebel: Reconfiguring bean 'ticketRelationshipController' [com.ultraip.intranet.thymeleaf.TicketRelationshipController$$EnhancerBySpringCGLIB$$2e9ccb9a]

This started today as I upgraded to JRebel 7.


Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>