public class SpringBootUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEV_TOOLS_REMOTE_SECRET |
static String |
DEV_TOOLS_REMOTE_SECRET_ENV |
static String |
SPRING_BOOT_DEVTOOLS_ARTIFACT_ID |
static String |
SPRING_BOOT_GRADLE_PLUGIN_ARTIFACT_ID |
static String |
SPRING_BOOT_GROUP_ID |
static String |
SPRING_BOOT_MAVEN_PLUGIN_ARTIFACT_ID |
| Modifier and Type | Method and Description |
|---|---|
static File |
findNativeArtifactFile(JavaProject project)
Returns the native executable artifact produced file by the Spring Boot build or null if not found.
|
static Plugin |
getNativePlugin(JavaProject project) |
static String |
getSpringBootActiveProfile(JavaProject project)
Returns the currently active spring-boot profile or null if not found.
|
static Properties |
getSpringBootApplicationProperties(String springActiveProfile,
URLClassLoader compileClassLoader)
Returns the spring boot configuration (supports `application.properties` and `application.yml`)
or an empty properties object if not found
|
static Properties |
getSpringBootApplicationProperties(URLClassLoader compileClassLoader)
Returns the spring boot configuration (supports `application.properties` and `application.yml`)
or an empty properties object if not found, it assumes first profile as default profile.
|
static Map<String,Object> |
getSpringBootPluginConfiguration(JavaProject javaProject)
Returns a Map containing the Spring Boot configuration for the applicable plugin (Maven or Gradle).
|
static Optional<String> |
getSpringBootVersion(JavaProject javaProject)
Determine the spring-boot major version for the current project
|
static boolean |
isSpringBootRepackage(JavaProject project) |
public static final String SPRING_BOOT_GROUP_ID
public static final String SPRING_BOOT_DEVTOOLS_ARTIFACT_ID
public static final String SPRING_BOOT_MAVEN_PLUGIN_ARTIFACT_ID
public static final String SPRING_BOOT_GRADLE_PLUGIN_ARTIFACT_ID
public static final String DEV_TOOLS_REMOTE_SECRET
public static final String DEV_TOOLS_REMOTE_SECRET_ENV
public static Properties getSpringBootApplicationProperties(URLClassLoader compileClassLoader)
compileClassLoader - compile class loaderpublic static Properties getSpringBootApplicationProperties(String springActiveProfile, URLClassLoader compileClassLoader)
springActiveProfile - currently active spring-boot profilecompileClassLoader - compile class loaderpublic static Optional<String> getSpringBootVersion(JavaProject javaProject)
javaProject - projectpublic static String getSpringBootActiveProfile(JavaProject project)
project - the JavaProject for which to search the active profile.public static Map<String,Object> getSpringBootPluginConfiguration(JavaProject javaProject)
javaProject - the JavaProject for which to search the Spring Boot plugin configuration.public static boolean isSpringBootRepackage(JavaProject project)
public static Plugin getNativePlugin(JavaProject project)
public static File findNativeArtifactFile(JavaProject project)
project - the JavaProject for which to search the native executable artifactIllegalStateException - if more than one native executable artifact is foundCopyright © 2024. All rights reserved.