In MacOS, they just open terminal and do these
vi .bash_profile
here vi is something like text editor ..
then the file named .bash_profile popsup and they store
export envVerNum=2.2.2
and save it and close it.
then open terminal again and type
echo $envVerNum
it returns 2.2.2 ! it also returns in sts4 !
Now, Whats the process in Windows ! Please explain me as i am noob to this Spring Boot !
I tried this ...
here's the application Properties !
spring.thymeleaf.cache=false #just for example
version=${envVerNum}
Here's the HomeController !
@Controller
public class homeController {
@Value("${version}")
private String ver;
@RequestMapping("/")
public String diaplayHome(Model model) throws JsonProcessingException {
model.addAttribute("venum", ver);
return "Home/home";
}
}
here's the Home html code ...
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Home !</title>
<div th:replace="layouts::hey1"></div>
</head>
<body>
<nav th:replace="layouts::hey"></nav>
<div class="container">
<h3>Main Dashboard</h3>
<a th:text="${venum}"></a>
<hr>
</body>
</html>
I want to set the envVerNum and call it inside the Sts4... please help me with windows !