SampleApplication Class — spring-boot Architecture
Architecture documentation for the SampleApplication class in SampleApplication.java from the spring-boot codebase.
Entity Profile
Source Code
build-plugin/spring-boot-maven-plugin/src/intTest/projects/run-additional-classpath-jar/src/main/java/org/test/SampleApplication.java lines 23–45
public class SampleApplication {
public static void main(String[] args) {
if (!readContent("one.txt").contains("1")) {
throw new IllegalArgumentException("Invalid content for one.txt");
}
if (!readContent("another/two.txt").contains("2")) {
throw new IllegalArgumentException("Invalid content for another/two.txt");
}
System.out.println("I haz been run");
}
private static String readContent(String location) {
InputStream in = SampleApplication.class.getClassLoader().getResourceAsStream(location);
if (in == null) {
throw new IllegalArgumentException("Not found: '" + location + "'");
}
try (Scanner scanner = new Scanner(in, StandardCharsets.UTF_8)) {
return scanner.useDelimiter("\\A").next();
}
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free