com.github.wtbian.util.ResolveDirectoryUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generator-maven-plugin Show documentation
Show all versions of generator-maven-plugin Show documentation
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.
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