feat():测试
parent
87118e5521
commit
5427bc562f
|
@ -3,6 +3,8 @@ package com.muyu.compile;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.constant.MethodSuffix;
|
import com.muyu.constant.MethodSuffix;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.tools.*;
|
import javax.tools.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -21,6 +23,8 @@ import java.nio.file.Paths;
|
||||||
*/
|
*/
|
||||||
public class JavaFileCompile {
|
public class JavaFileCompile {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(JavaFileCompile.class);
|
||||||
|
|
||||||
public static Result<Object> compile(String fileName){
|
public static Result<Object> compile(String fileName){
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -38,7 +42,7 @@ public class JavaFileCompile {
|
||||||
|
|
||||||
// class文件路径
|
// class文件路径
|
||||||
String externalClassFilePath = "/home/lib/com/muyu/generate/"+fileName+ MethodSuffix.CLASSSUFFIX;
|
String externalClassFilePath = "/home/lib/com/muyu/generate/"+fileName+ MethodSuffix.CLASSSUFFIX;
|
||||||
|
log.info(externalClassFilePath);
|
||||||
Path path = Paths.get(externalClassFilePath);
|
Path path = Paths.get(externalClassFilePath);
|
||||||
|
|
||||||
String externalClassDir = externalClassFilePath.substring(0, externalClassFilePath.lastIndexOf("/"));
|
String externalClassDir = externalClassFilePath.substring(0, externalClassFilePath.lastIndexOf("/"));
|
||||||
|
|
Loading…
Reference in New Issue