clever-framework-front/src/main/java/io/github/toquery/framework/front/connfig/AppFrontConfigurer.java
private String resolvePathPrefix() {
        String fullExecutablePath;
        try {
            fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            /* try without decoding if this ever happens */
            fullExecutablePath = this.getClass().getResource("").getPath();
        }
        String rootPath = Paths.get(".").toUri().normalize().getPath();
        String extractedPath = fullExecutablePath.replace(rootPath, "");
        //  解决开发环境 下的 解析路径
        //  int extractionEndIndex = extractedPath.indexOf("target/");
        int extractionEndIndex = extractedPath.indexOf(appFrontProperties.getPrefix());
        if (extractionEndIndex <= 0) {
            return "";
        }
        return extractedPath.substring(0, extractionEndIndex);
    }
/**
     * Resolve path prefix to static resources.
     */
Resolve path prefix to static resources.
Resolve path prefix to static resources .
private String resolvePathPrefix() {
        String fullExecutablePath;
        try {
            fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            /* try without decoding if this ever happens */
            fullExecutablePath = this.getClass().getResource("").getPath();
        }
        String rootPath = Paths.get(".").toUri().normalize().getPath();
        String extractedPath = fullExecutablePath.replace(rootPath, "");
        int extractionEndIndex = extractedPath.indexOf(appFrontProperties.getPrefix());
        if (extractionEndIndex <= 0) {
            return "";
        }
        return extractedPath.substring(0, extractionEndIndex);
    }
private String resolvePathPrefix ( ) { String fullExecutablePath ; try { fullExecutablePath = decode ( this . getClass ( ) . getResource ( "" ) . getPath ( ) , StandardCharsets . UTF_8 . name ( ) ) ; } catch ( UnsupportedEncodingException e ) { /* try without decoding if this ever happens */ fullExecutablePath = this . getClass ( ) . getResource ( "" ) . getPath ( ) ; } String rootPath = Paths . get ( "." ) . toUri ( ) . normalize ( ) . getPath ( ) ; String extractedPath = fullExecutablePath . replace ( rootPath , "" ) ; int extractionEndIndex = extractedPath . indexOf ( appFrontProperties . getPrefix ( ) ) ; if ( extractionEndIndex <= 0 ) { return "" ; } return extractedPath . substring ( 0 , extractionEndIndex ) ; }
Resolve path prefix to static resources.
Resolve path prefix to static resources .
//  解决开发环境 下的 解析路径 //  int extractionEndIndex = extractedPath.indexOf("target/");