All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.suchtool.nicetool.util.spring.SpringBootUtil Maven / Gradle / Ivy

There is a newer version: 1.1.9
Show newest version
package com.suchtool.nicetool.util.spring;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Map;

public class SpringBootUtil {
    public static String parseRunClassPackage() {
        Map runClassBeanMap = ApplicationContextHolder.getContext()
                .getBeansWithAnnotation(SpringBootApplication.class);
        Object runObject = runClassBeanMap.entrySet().iterator().next().getValue();
        return AopUtil.getTargetClass(runObject).getPackage().getName();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy