Java
- LiveReload server: To save the time wasted in refreshing the browser after every code change, Spring Boot comes with a LiveReload embedded server that triggers an automatic browser refresh. The LiveReload extensions are available for different browsers. Once installed and enabled, any change in the code is detected by the LiveReload server and the browser is automatically refreshed to reflect the change.
- Actuator: Spring Boot Actuator is a feature that provides monitoring features for the application during development and after deployment. It provides metadata about the application like the beans configured, how autoconfiguration has worked, how many times a specific service is called, how many times a specific service has failed, etc.
- Runtime exceptions are referred to as unchecked exceptions. All other exceptions are checked exceptions
- The fact that you are handling an exception does not make it a Checked Exception if it is a RuntimeException
- Checked Exceptions: A checked exception must be caught somewhere in your code. If you invoke a method that throws a checked exception but you don't catch the checked exception somewhere, your code will not compile. That's why they're called checked exceptions: the compiler checks to make sure that they're handled or declared.
- always declare the most precise exception possible, or a list of such. The exceptions you declare your method as capable of throwing are a part of the contract between your method and the caller. Throwing "FileNotFoundException" means that it is possible the file name isn't valid and the file will not be found; the caller will need to handle that intelligently. Throwing Exception means "Hey, sh*t happens. Deal." Which is a very poor API.
- Java is always pass-by-value.
Comments
Post a Comment