Home / Class/ Versions Class — spring-boot Architecture

Versions Class — spring-boot Architecture

Architecture documentation for the Versions class in Versions.java from the spring-boot codebase.

Entity Profile

Source Code

build-plugin/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/Versions.java lines 33–62

class Versions {

	private final Map<String, String> versions;

	Versions() {
		this.versions = loadVersions();
	}

	private static Map<String, String> loadVersions() {
		try (InputStream input = Versions.class.getClassLoader().getResourceAsStream("extracted-versions.properties")) {
			Properties properties = new Properties();
			properties.load(input);
			Map<String, String> versions = new HashMap<>();
			properties.forEach((key, value) -> versions.put((String) key, (String) value));
			return versions;
		}
		catch (IOException ex) {
			throw new RuntimeException(ex);
		}
	}

	@Nullable String get(String name) {
		return this.versions.get(name);
	}

	Map<String, String> asMap() {
		return Collections.unmodifiableMap(this.versions);
	}

}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free