How to add custom JS code in Spring Boot?

devquora
devquora

Posted On: Feb 22, 2018

 

/src/main/resources/static is the suggested folder for static content in Spring boot.

You can create a JS file for sending an alert by creating a custom file named custom.js in /src/main/resources/static/js/ directory with below code

alert("I'm active");

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Spring Boot Interview Questions

    What does Spring Boot mean?

    Spring Boot is a system from “The Spring Team” to facilitate the bootstrapping and development of new Spring Applica..

    Spring Boot Interview Questions

    What are the various Advantages Of Using Spring Boot?

    Here are some of the various advantages of using Spring Boot:It is quite easy to create Spring Based applications with..

    Spring Boot Interview Questions

    What are the various features of Spring Boot?

    Various Spring Boot Features are as follows:Web Development Spring Application Application occasions and listeners Adm..