Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
How to access JS file from within template html page? Spring Boot

I know this is a duplicate, but I cannot figure this out. I have a file structure like: enter image description here

How can I link factoid-page.js into factoid-page.html ?

I have tried: <script type="text/javascript" th:src="@{/factoid-page.js}"></script>

This does not work.

Please help, Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Accroading to this page: Add CSS and JS to Thymeleaf

For CSS and JavaScript files, the default directory is src/main/resources/static..

Please reorganize your static folder:

  1. put .js files into src/main/resources/static/js/
  2. put .css files into src/main/resources/static/css/

and try this

<script type="text/javascript" th:src="@{/js/factoid-page.js}"></script>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda