If you have only one project, you don’t have to use the optional attribute.If you use Spring Tool Suite IDE, enable Spring Boot DevTools is easy: right-click on the project, then click Spring > Add DevTools from the context menu: This dependency is specified as optional so the Spring DevTools will not be used in projects/modules that depend on yours. Enable Automatic Restart for Spring Boot projectTo use Spring Boot DevTools, you must declare the following dependency into your project’s pom.xml file: And this post focuses on Spring Boot automatic restart. ![]() jars) are already loaded in a separate classloader.Note that automatic restart is different than automatic reload (or live reload) which reloads only changes for static content (e.g. It is full, automatic restart but quick enough – much faster than “cold” restart – because the things do not change (e.g. ![]() What is Spring Boot automatic restart?When you make changes to Java code, Spring Boot DevTools will restart the embedded server to reflect the changes. That really slows down your productivity as your time wasted on waiting for the application restart.To overcome that bottleneck in Spring Boot development, the Spring team created Spring DevTools that can automatically restart the application so you don’t have to do restart manually – thus you will regain your productivity. ![]() However, this feature comes with a drawback in development time: every changes you made to your project requires complete application restart to take effect. One of Spring Boot’s key features is creating a Java web application as a standalone, executable JAR file with embedded server like Tomcat.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |