NutzCN Logo
问答 代码生成器怎么使用,按照官网一步一步操作的
发布于 2833天前 作者 daheimao888 3235 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
D:\Java\jdk1.8.1_21\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:62044,suspend=y,server=n -Dfile.encoding=UTF-8 -classpath "D:\Java\jdk1.8.1_21\jre\lib\charsets.jar;D:\Java\jdk1.8.1_21\jre\lib\deploy.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\access-bridge-64.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\cldrdata.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\dnsns.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\jaccess.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\jfxrt.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\localedata.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\nashorn.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\sunec.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\sunjce_provider.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\sunmscapi.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\sunpkcs11.jar;D:\Java\jdk1.8.1_21\jre\lib\ext\zipfs.jar;D:\Java\jdk1.8.1_21\jre\lib\javaws.jar;D:\Java\jdk1.8.1_21\jre\lib\jce.jar;D:\Java\jdk1.8.1_21\jre\lib\jfr.jar;D:\Java\jdk1.8.1_21\jre\lib\jfxswt.jar;D:\Java\jdk1.8.1_21\jre\lib\jsse.jar;D:\Java\jdk1.8.1_21\jre\lib\management-agent.jar;D:\Java\jdk1.8.1_21\jre\lib\plugin.jar;D:\Java\jdk1.8.1_21\jre\lib\resources.jar;D:\Java\jdk1.8.1_21\jre\lib\rt.jar;C:\Users\Administrator\.m2\repository\cn\enilu\tools\nutzwk-code-generator\1.2\nutzwk-code-generator-1.2.jar;C:\Users\Administrator\.m2\repository\org\atteo\evo-inflector\1.0.1\evo-inflector-1.0.1.jar;C:\Users\Administrator\.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\Administrator\.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\Administrator\.m2\repository\org\nutz\nutz\1.r.61-SNAPSHOT\nutz-1.r.61-20170321.040947-83.jar;C:\Users\Administrator\.m2\repository\org\nutz\nutz-plugins-daocache\1.r.61-SNAPSHOT\nutz-plugins-daocache-1.r.61-20170318.141725-133.jar;C:\Users\Administrator\.m2\repository\org\nutz\nutz-integration-quartz\1.r.61-SNAPSHOT\nutz-integration-quartz-1.r.61-20170318.141028-133.jar;C:\Users\Administrator\.m2\repository\org\nutz\nutzwx\1.r.61-SNAPSHOT\nutzwx-1.r.61-20170305.123103-5.jar;C:\Users\Administrator\.m2\repository\org\nutz\nutz-plugins-views\1.r.61-SNAPSHOT\nutz-plugins-views-1.r.61-20170318.141519-133.jar;C:\Users\Administrator\.m2\repository\com\vdurmont\emoji-java\3.1.3\emoji-java-3.1.3.jar;C:\Users\Administrator\.m2\repository\org\quartz-scheduler\quartz\2.2.3\quartz-2.2.3.jar;C:\Users\Administrator\.m2\repository\c3p0\c3p0\0.9.1.1\c3p0-0.9.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-web\1.2.5\shiro-web-1.2.5.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-core\1.2.5\shiro-core-1.2.5.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-log4j12\1.7.21\slf4j-log4j12-1.7.21.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\Administrator\.m2\repository\cn\apiclub\tool\simplecaptcha\1.2.2\simplecaptcha-1.2.2.jar;C:\Users\Administrator\.m2\repository\com\alibaba\druid\1.0.28\druid-1.0.28.jar;C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\5.1.39\mysql-connector-java-5.1.39.jar;C:\Users\Administrator\.m2\repository\net\sourceforge\jtds\jtds\1.3.1\jtds-1.3.1.jar;C:\Users\Administrator\.m2\repository\com\google\zxing\javase\3.2.1\javase-3.2.1.jar;C:\Users\Administrator\.m2\repository\com\google\zxing\core\3.2.1\core-3.2.1.jar;C:\Users\Administrator\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\Administrator\.m2\repository\net\sf\ehcache\ehcache\2.10.3\ehcache-2.10.3.jar;C:\Users\Administrator\.m2\repository\redis\clients\jedis\2.9.0\jedis-2.9.0.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-pool2\2.4.2\commons-pool2-2.4.2.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-email\1.4\commons-email-1.4.jar;C:\Users\Administrator\.m2\repository\com\sun\mail\javax.mail\1.5.5\javax.mail-1.5.5.jar;C:\Users\Administrator\.m2\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\Administrator\.m2\repository\org\apache\shiro\shiro-ehcache\1.3.2\shiro-ehcache-1.3.2.jar;C:\Users\Administrator\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.3\commons-beanutils-core-1.8.3.jar;C:\Users\Administrator\.m2\repository\com\ibeetl\beetl\2.5.2\beetl-2.5.2.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr4-runtime\4.2\antlr4-runtime-4.2.jar;C:\Users\Administrator\.m2\repository\org\abego\treelayout\org.abego.treelayout.core\1.0.1\org.abego.treelayout.core-1.0.1.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr4-annotations\4.2\antlr4-annotations-4.2.jar;C:\Users\Administrator\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\Administrator\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.1\commons-logging-1.1.jar;C:\Users\Administrator\.m2\repository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;C:\Users\Administrator\.m2\repository\org\brickred\socialauth\4.12\socialauth-4.12.jar;C:\Users\Administrator\.m2\repository\org\json\json\20160212\json-20160212.jar;C:\Users\Administrator\.m2\repository\io\jsonwebtoken\jjwt\0.6.0\jjwt-0.6.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.1\jackson-databind-2.8.1.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.1\jackson-core-2.8.1.jar;C:\Users\Administrator\.m2\repository\cn\wizzer\wk-code-generator\4.0.1-SNAPSHOT\wk-code-generator-4.0.1-20170313.154213-3.jar;D:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.5\lib\idea_rt.jar" cn.wizzer.commons.code.Generator -i Cms_testcode -u /platform/cms -b wk-app/wk-web -p cn.wizzer.app.cms -v index_add_detail_edit_ -mod cn.wizzer.app.cms.modules.models -ctr cn.wizzer.app.web.modules.controllers.platform.cms -sev cn.wizzer.app.cms.modules.services controller service locale view
Connected to the target VM, address: '127.0.0.1:62044', transport: 'socket'
[DEBUG] 16:20:46.963 org.nutz.resource.Scans.printLocations(Scans.java:545) - Locations count=75 time use 1574ms
[DEBUG] 16:20:46.991 org.nutz.resource.Scans.scan(Scans.java:258) - Found 2 resource by src( code/code.json ) , regex( ^(.+[.])(js|json)$ )
[DEBUG] 16:20:46.993 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) - loading [code/code.json]
[DEBUG] 16:20:47.081 org.nutz.castor.Castors.reload(Castors.java:115) - Using 95 castor for Castors
[DEBUG] 16:20:47.087 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) - loading [code/code.json]
[DEBUG] 16:20:47.091 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:57) - Loaded 4 bean define from path=[code/code.json] --> [conf, dao, dataSource, loader]
[INFO ] 16:20:47.094 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:98) - NutIoc init begin ...
[INFO ] 16:20:47.097 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:115) - ... NutIoc init complete
[DEBUG] 16:20:47.104 cn.wizzer.commons.code.EntityDescLoader.loadTables(EntityDescLoader.java:39) - output dir = D:\IdeaProjects\NutzWk-modular\wk-app\wk-web\target\classes\cn\wizzer\app\cms\modules\models
[DEBUG] 16:20:47.153 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip Cms_link
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip cms_channel
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip cms_site
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip Cms_channel
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip Cms_link_class
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip Cms_article
Disconnected from the target VM, address: '127.0.0.1:62044', transport: 'socket'
[DEBUG] 16:20:47.154 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip cms_link
[DEBUG] 16:20:47.156 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip cms_article
[DEBUG] 16:20:47.156 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip cms_link_class
[DEBUG] 16:20:47.156 cn.wizzer.commons.code.Generator.main(Generator.java:194) - skip Cms_site
[INFO ] 16:20:47.158 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:255) - org.nutz.ioc.impl.NutIoc@750468423 is closing. startup date [17-03-21 16:20:47.094]
[INFO ] 16:20:47.159 org.nutz.ioc.impl.NutIoc.depose(NutIoc.java:262) - org.nutz.ioc.impl.NutIoc@750468423 is deposed. startup date [17-03-21 16:20:47.094]
[DEBUG] 16:20:47.159 cn.wizzer.commons.code.Generator.main(Generator.java:247) - done!

Process finished with exit code 0
11 回复

这是哪个?给个链接

这个是javabean

/**
 * 代码测试工具生成类
 * Created by Administrator on 2017/3/21 0021.
 */
@Table("cms_testcode")
public class Cms_testcode {

    @Comment
    private String username;
    @Comment
    private String passwd;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }
}

就是官网项目

哦,nutzwk的,不是写了使用手册吗?

@wendal
是啊,一步一步按照教程使用,没成功

bean也要生成class了才能用

不知道解决了没有,我也出这个问题,日志没有报错,就是对应目录没有生成文件

@wendal 就是说加入代码生成器之后需要项目编译之后才能正常使用代码生成器是吧

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