Spring Controller destroy method?

Does Spring's `Controller` have any sort of destroy/cleanup method? I couldn't find anything in the JavaDocs for `Controller` and `AbstractController`. I'm looking for the equivalent of `javax.servlet.Servlet`'s `destroy()` method. The reason for this is that I'm starting a thread in my Spring controller. I want the thread to terminate whenever the controller is taken out of server (such as when the container is shutdown).
This isn't an "answer", but you probably don't really want to be starting a thread within a controller... sounds messy and like a break of the abstraction layers

以上就是Spring Controller destroy method?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准