Skip to content
Snippets Groups Projects
Select Git revision
  • 3bf479f0222278b8db1d72e93c42ef8d4e89294f
  • main default protected
  • OZG-7985-anfrage-von-landesebene
  • OZG-7985-helm-changes
  • release
  • OZG-8252-gitlab-pipeline
  • OZG-7774-E2E
  • OZG-5120-PoC-Native-Image
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.1
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.0
28 results

SecurityConfiguration.java

Blame
  • RootService.java 845 B
    package de.ozgcloud.admin;
    
    import java.time.Instant;
    import java.util.Optional;
    
    import org.springframework.boot.info.BuildProperties;
    import org.springframework.stereotype.Service;
    
    import lombok.RequiredArgsConstructor;
    
    @Service
    @RequiredArgsConstructor
    class RootService {
    	private final Optional<BuildProperties> buildProperties;
    
    	public String getVersion() {
    		return buildProperties.map(BuildProperties::getVersion).orElse("--");
    	}
    
    	public Instant getBuildTime() {
    		return buildProperties.map(BuildProperties::getTime).orElse(Instant.now());
    	}
    
    	public String getJavaVersion() {
    		return System.getProperty("java.version", "?");
    	}
    
    	public String getBuildNumber() {
    		return buildProperties.map(p -> p.get("number")).orElse("?");
    	}
    
    	public String getBuildUrl() {
    		return buildProperties.map(p -> p.get("url")).orElse("?");
    	}
    }