Skip to content

Instantly share code, notes, and snippets.

@v1talii-dev
Last active December 7, 2018 13:12
Show Gist options
  • Save v1talii-dev/b0c5f10244ee6f57fcfb7848700c7791 to your computer and use it in GitHub Desktop.
Save v1talii-dev/b0c5f10244ee6f57fcfb7848700c7791 to your computer and use it in GitHub Desktop.
Spring boot: auto-reload resource (HTML, JSP, JavaScript, CSS, img) for Intellij IDEA Ultimate Edition

Обновление ресурсов (HTML, JSP, JavaScript, CSS, img) без перезагрузки сервера для Intellij IDEA Ultimate Edition

  • Если требуется (при использовании Lombok), предварительно настраиваем препроцессинг сборки в File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
  • Переходим в Run -> Edit configurations, слева выбираем Spring Boot. Во вкладке Configurations в поле On Update action выставляем Update classes and resources. Подробнее читайте тут.
  • Переходим в File -> Settings -> Build, Execution, Deployment -> Compiler и ставим галку напротив Build project automatically
  • Выполняем сочетание клавиш Shift + Ctrl + A, далее выбираем Registry из выпадающего меню.
  • В списке находим compiler.automake.allow.when.app.running и ставим галку.
  • Запускаем приложение через Spring Boot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment