dx_manh
Deployment issues in Spring Boot project
I have declared the Thymeleaf path to the templates directory in the application.yaml file:
spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html
I have also declared a route so that when accessing the corresponding URL, it will go to the file: client/index.html:
@GetMapping(value = {"/", "/home", "/trang-chu"})
public ModelAndView index() {
ModelAndView view = new ModelAndView("/client/index");
return view;
}
And here is the file path of that file in the project:
src/main/resources/templates/client/index.html
I have also declared the dependent libraries in the pom.xml file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
</dependency>
27 replies
After redeploying, I lost the uploaded images in the directory
If I use the railway volumes option, do I have to pay an additional fee? My website serves very simple needs, so I'm currently using the Hobby package. I don't want to incur any additional costs. I would greatly appreciate everyone's response
20 replies