Abdur Rahman
Abdur Rahman

Reputation: 41

Accessing HTML/JavaScript file from Jar/war file in Spring Boot using Thymeleaf

I am working on the Maven-based Project where I have to create a jar file that contains JavaScript file(E.g Bar chart) and in the second project, I have the Thymeleaf template, where I have to load the jar file to view the contents. Actually it is a modular-based Project.

The question is how can i load the executed jar/war file of the Maven-based project to the second Thymeleaf-based project to view the contents on it?

Thanks in Advance.

Upvotes: 1

Views: 559

Answers (1)

Eduardo Santos
Eduardo Santos

Reputation: 33

Welcome.

I tested this two months ago and used a jar project that was shown in the image. Basically, you should call these files from the root of the main project ex: http://localhost:8080/project/js/bootstrap.js

I left this project public, I created exactly to test this situation, if you want, you can see it in this repo: https://github.com/e3duardo/webasset

webasset

Upvotes: 1

Related Questions