Added git info plugin and footer
This commit is contained in:
parent
b9ad037f60
commit
6a7f291e5c
26
pom.xml
26
pom.xml
@ -192,6 +192,32 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>pl.project13.maven</groupId>
|
||||
<artifactId>git-commit-id-plugin</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>get-the-git-infos</id>
|
||||
<goals>
|
||||
<goal>revision</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>validate-the-git-infos</id>
|
||||
<goals>
|
||||
<goal>validateRevision</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
||||
<excludeProperties>
|
||||
<excludeProperty>git.user.*</excludeProperty>
|
||||
</excludeProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -28,7 +28,8 @@ public class BeanConfigurations {
|
||||
@Bean
|
||||
public MessageSource messageSource() {
|
||||
final ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
|
||||
messageSource.setBasenames("classpath:/messages,file:./config/messages");
|
||||
messageSource
|
||||
.setBasenames("classpath:/messages,file:./config/messages");
|
||||
messageSource.setUseCodeAsDefaultMessage(true);
|
||||
messageSource.setDefaultEncoding("UTF-8");
|
||||
messageSource.setCacheSeconds(5);
|
||||
@ -45,10 +46,4 @@ public class BeanConfigurations {
|
||||
return keyBasedPersistenceTokenService;
|
||||
}
|
||||
|
||||
// @Bean
|
||||
// public Connection connection() throws SQLException
|
||||
// {
|
||||
// return DriverManager.getConnection(url, userName, password);
|
||||
// }
|
||||
|
||||
}
|
||||
|
22
src/main/java/org/ros/chatto/config/BuildInfo.java
Normal file
22
src/main/java/org/ros/chatto/config/BuildInfo.java
Normal file
@ -0,0 +1,22 @@
|
||||
package org.ros.chatto.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Component
|
||||
@PropertySource(value = "classpath:git.properties")
|
||||
@Getter
|
||||
public class BuildInfo {
|
||||
private final String buildVersion;
|
||||
private final String branchName;
|
||||
|
||||
public BuildInfo(@Value("${git.build.version") String buildVersion,
|
||||
@Value("${git.branch") String branchName) {
|
||||
this.buildVersion = buildVersion;
|
||||
this.branchName = branchName;
|
||||
}
|
||||
|
||||
}
|
@ -130,6 +130,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="fragments/head :: footerFragment"></th:block>
|
||||
|
||||
<template id="msg_container_template">
|
||||
<div class="d-flex justify-content-start mb-4">
|
||||
<div class="img_cont_msg">
|
||||
|
@ -78,6 +78,25 @@
|
||||
|
||||
<body>
|
||||
|
||||
<th:block th:fragment="footerFragment">
|
||||
<!-- Footer -->
|
||||
<footer class="page-footer font-small blue">
|
||||
|
||||
<!-- Copyright -->
|
||||
<div class="footer-copyright text-center py-3">© 2020 Copyright:
|
||||
Chatto
|
||||
<div>
|
||||
Build revision: <div th:text="${@environment.getProperty('git.build.version')}">None
|
||||
</div>
|
||||
</div>
|
||||
from branch <div th:text="${@environment.getProperty('git.branch')}">None</div>
|
||||
</div>
|
||||
<!-- Copyright -->
|
||||
|
||||
</footer>
|
||||
<!-- Footer -->
|
||||
</th:block>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -12,7 +12,8 @@
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script>
|
||||
<script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" defer="defer" th:if="false"></script>
|
||||
<script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" defer="defer"
|
||||
th:if="false"></script>
|
||||
|
||||
|
||||
</link>
|
||||
@ -105,7 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<th:block th:include="fragments/head :: footerFragment"></th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user