简体   繁体   中英

play framework disable browser debugger in dev mode

I'm working on a play2. 6 application using Java, and I hosted my application dev mode. I want to know how to disable the debug view in this mode and redirect to another error page that a created automatically. 404 errors to 404err.scala.html java errors to 500err.sacala.html databaseConnction to dbDownErr.scala.html all the solutions i found are a production mode solutions

I would not recommend hosting your app in dev mode. It's really easy to deploy your app with play.

Nonetheless if you really want to do that, you could override the default error handler: https://www.playframework.com/documentation/2.6.x/JavaErrorHandling#Supplying-a-custom-error-handler

Check the HttpErrorHandler interface to know what are the methods to override

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM