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

com.github.wtbian.util.ResolveDirectoryUtil Maven / Gradle / Ivy

Go to download

The mvc-generator makes it easier to write code with spring-mvc applications. mvc-generator generate code with freemarker template of controller, service and dao etc level object using maven plugin. Simplicity is the biggest advantage of the generator code over generating code tools.

There is a newer version: 1.0.4.1
Show newest version
package com.github.wtbian.util;

/**
 * Created by bianwentao on 2019/1/27.
 */
public class ResolveDirectoryUtil {

    public static String getPackage(String directory){
        if(directory.contains("src/main/java/")){
            return directory.split("src/main/java/")[1].replace('/', '.');
        }else if(directory.startsWith("/")){
            return directory.substring(1).replace('/', '.');
        }else {
            return directory.replace('/', '.');
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy