NutzCN Logo
问答 使用nutzwk-plugin 插件自动生成代码 报错,是为什么呢?
发布于 2207天前 作者 zozoh44 1914 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
Connected to the target VM, address: '127.0.0.1:64342', transport: 'socket'
[DEBUG] 18:30:06.576 org.nutz.resource.Scans.printLocations(Scans.java:527) - Locations count=115 time use 166ms
[DEBUG] 18:30:06.601 org.nutz.resource.Scans.scan(Scans.java:280) - Found 0 resource by src( /code/code.json ) , regex( ^(.+[.])(js|json)$ )
Exception in thread "main" java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in /code/code.json
	at org.nutz.lang.Lang.makeThrow(Lang.java:154)
	at org.nutz.resource.Scans.loadResource(Scans.java:112)
	at org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:45)
	at cn.enilu.common.code.Generator.main(Generator.java:152)
[DEBUG] 18:30:06.749 org.nutz.castor.Castors.reload(Castors.java:116) - Using 101 castor for Castors
Disconnected from the target VM, address: '127.0.0.1:64342', transport: 'socket'
package cn.xukuan.app.library.modules.models;

import cn.xukuan.app.library.framework.base.model.BaseModel;
import org.nutz.dao.entity.annotation.*;
import org.nutz.integration.json4excel.annotation.J4EIgnore;
import org.nutz.integration.json4excel.annotation.J4EName;

import java.io.Serializable;
import java.util.List;
import java.util.Map;


@Comment("图书记录")
@Table("sys_book")
public class Sys_book extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Name
    private String id;
    @Column
    @Comment("编码")
    @ColDefine(type = ColType.VARCHAR)
    private String bookCode;
    @Column
    @Comment("图书名称")
    @ColDefine(type = ColType.VARCHAR)
    private String bookName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBookCode() {
        return bookCode;
    }

    public void setBookCode(String bookCode) {
        this.bookCode = bookCode;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
}

3 回复

这是比较老的插件了吧?用idea版的nutzwk插件啦

来自炫酷的 NutzCN

新版代码生成器插件安装包及源码在项目的 wk-code 目录下,

或在 IDEA 插件安装页面,搜索关键词 “wk-code-ideaplugin-nb” 进行在线安装。

好的,谢谢各位大佬

添加回复
请先登陆
回到顶部