v1.3 RC

上级 d254e8a2
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main"
path="src/main/java">
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main" />
<attribute name="gradle_used_by_scope" value="main,test" />
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test"
path="src/test/java">
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test" />
<attribute name="gradle_used_by_scope" value="test" />
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/" />
<classpathentry kind="con"
path="org.eclipse.buildship.core.gradleclasspathcontainer" />
<classpathentry kind="output" path="bin/default" />
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId"
project-version="1.5.0">
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="maxkey-core">
<wb-resource deploy-path="/" source-path="/src/main/java" />
<wb-resource deploy-path="/" source-path="/src/test/java" />
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>
......@@ -10,6 +10,7 @@ public class PathUtils {
private String classPath;
private String appPath;
public static String WEB_INFO = "/WEB-INF/";
private static final String PATH_FILE_NAME = "PathUtils.properties";
/**
* getInstance .
......@@ -29,7 +30,7 @@ public class PathUtils {
public PathUtils() {
try {
classPath = java.net.URLDecoder.decode(
PathUtils.class.getResource("PathUtils.xml").getFile(),
PathUtils.class.getResource(PATH_FILE_NAME).getFile(),
"UTF-8"
);
_logger.debug("PathUtils() PathUtils " + classPath);
......@@ -37,7 +38,7 @@ public class PathUtils {
e.printStackTrace();
}
String fileProtocol = PathUtils.class.getResource("PathUtils.properties").getProtocol();
String fileProtocol = PathUtils.class.getResource(PATH_FILE_NAME).getProtocol();
_logger.info("Properties Protocol:"
+ PathUtils.class.getResource("PathUtils.properties").getProtocol());
......@@ -53,7 +54,8 @@ public class PathUtils {
}
_logger.info("PathUtils Class Path : " + classPath);
classPath = classPath.substring(0, classPath.indexOf("/org/maxkey/util/PathUtils.xml"));
classPath = classPath.substring(0,
classPath.indexOf("/org/maxkey/util/" + PATH_FILE_NAME));
if (classPath.indexOf(WEB_INFO) == -1) {
appPath = classPath.substring(0, classPath.lastIndexOf("/"));
} else {
......
<root>
org.maxkey.util.PathUtils
</root>
\ No newline at end of file
org.maxkey.util.PathUtils
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册