NutzWK从git上下载,修改wk-model增加类OptionVO,在wk-nb-service-sys使用这个类。build 启动 都没问题,打包时报错程序找不到和找不到符号。
package cn.wizzer.app.sys.modules.models;
public class OptionVO {
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
service impl 中使用:
package cn.wizzer.app.sys.modules.services.impl;
import cn.wizzer.app.sys.modules.models.Sys_dict;
import cn.wizzer.app.sys.modules.models.OptionVO;
import cn.wizzer.app.sys.modules.services.SysDictService;
import cn.wizzer.framework.base.service.BaseServiceImpl;
import com.alibaba.dubbo.config.annotation.Service;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@IocBean(args = {"refer:dao"})
@Service(interfaceClass=SysDictService.class)
public class SysDictServiceImpl extends BaseServiceImpl<Sys_dict> implements SysDictService {
public SysDictServiceImpl(Dao dao) {
super(dao);
}
/**
* 通过code获取name
*
* @param code
* @return
*/
//@Cacheable
public String getNameByCode(String code) {
OptionVO optionVO = new OptionVO();
optionVO.setKey("3");
optionVO.setValue("323");
Sys_dict dict = this.fetch(Cnd.where("code", "=", code));
return dict == null ? "" : dict.getName();
}
//省略
}
打包报错:
"C:\Program Files\Java\jdk1.8.0_191\bin\java" -Dmaven.multiModuleProjectDirectory=D:\DEV\project\NutzWk\wk-app\wk-nb-service-sys -Xms256m -Xmx512m "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 172.3544.6\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 172.3544.6\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 172.3544.6\lib\idea_rt.jar=50425:C:\Program Files\JetBrains\IntelliJ IDEA 172.3544.6\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 172.3544.6\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.2.1 package
[INFO] Scanning for projects...
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.3-SNAPSHOT/maven-metadata.xml (598 B at 1.6 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wk-nb-service-sys 5.1.3
[INFO] ------------------------------------------------------------------------
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-nutz-dao/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-nutz-dao/2.3-SNAPSHOT/maven-metadata.xml (993 B at 11.5 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter/2.3-SNAPSHOT/maven-metadata.xml (599 B at 5.3 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-daocache/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-daocache/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 11.9 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzmore/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzmore/1.r.67-SNAPSHOT/maven-metadata.xml (597 B at 6.9 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 13.6 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-core/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-core/2.3-SNAPSHOT/maven-metadata.xml (981 B at 11.3 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-json4excel/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-json4excel/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 13.6 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-dubbo/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-dubbo/2.3-SNAPSHOT/maven-metadata.xml (990 B at 11.1 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-dubbo/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-dubbo/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 14.1 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-jdbc/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-jdbc/2.3-SNAPSHOT/maven-metadata.xml (989 B at 11.2 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-redis/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-redis/2.3-SNAPSHOT/maven-metadata.xml (990 B at 11.1 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-jedis/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-integration-jedis/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 13.4 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.3-SNAPSHOT/maven-metadata.xml (992 B at 11.8 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 14.0 KB/sec)
Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-test-junit4/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-test-junit4/2.3-SNAPSHOT/maven-metadata.xml (996 B at 11.6 KB/sec)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wk-nb-service-sys ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ wk-nb-service-sys ---
[INFO] Compiling 12 source files to D:\DEV\project\NutzWk\wk-app\wk-nb-service-sys\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[4,40] 找不到符号
符号: 类 OptionVO
位置: 程序包 cn.wizzer.app.sys.modules.models
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[37,9] 找不到符号
符号: 类 OptionVO
位置: 类 cn.wizzer.app.sys.modules.services.impl.SysDictServiceImpl
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[37,33] 找不到符号
符号: 类 OptionVO
位置: 类 cn.wizzer.app.sys.modules.services.impl.SysDictServiceImpl
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.909 s
[INFO] Finished at: 2019-03-27T06:57:20+08:00
[INFO] Final Memory: 30M/319M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project wk-nb-service-sys: Compilation failure: Compilation failure:
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[4,40] 找不到符号
[ERROR] 符号: 类 OptionVO
[ERROR] 位置: 程序包 cn.wizzer.app.sys.modules.models
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[37,9] 找不到符号
[ERROR] 符号: 类 OptionVO
[ERROR] 位置: 类 cn.wizzer.app.sys.modules.services.impl.SysDictServiceImpl
[ERROR] /D:/DEV/project/NutzWk/wk-app/wk-nb-service-sys/src/main/java/cn/wizzer/app/sys/modules/services/impl/SysDictServiceImpl.java:[37,33] 找不到符号
[ERROR] 符号: 类 OptionVO
[ERROR] 位置: 类 cn.wizzer.app.sys.modules.services.impl.SysDictServiceImpl
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Process finished with exit code 1