使用java7在Jhipster上创建应用程序?

时间:2017-12-17 22:33:52

标签: java jhipster

我正在尝试使用jhipster,到目前为止我已经看到它如何在java8上工作,我甚至找到了一个java7的示例repo,当然是java 8(https://github.com/jhipster/jhipster-sample-app-java7)。

我想知道是否有任何方法可以生成使用java7运行的应用程序?我知道是从jhipster弃用但似乎我可以运行jhipster v 1.7.0我可以做到,任何想法如何?

到目前为止,这是jhipster -help显示的内容

C:\Users\user>jhipster -help

  Usage: jhipster [command] [options]


  Commands:

    app                       Create a new JHipster application based on the selected options
    aws                       Deploy the current application to Amazon Web Services
    ci-cd                     Create pipeline scripts for popular Continuous Integration/Continuous Deployment tools
    client                    Create a new JHipster client-side application based on the selected options
    cloudfoundry              Generate a `deploy/cloudfoundry` folder with a specific manifest.yml to deploy to Cloud Foundry
    docker-compose            Create all required Docker deployment configuration for the selected applications
    entity [name]             Create a new JHipster entity: JPA entity, Spring server-side components and Angular client-side components
    export-jdl [jdlFile]      Create a JDL file from the existing entities
    heroku                    Deploy the current application to Heroku
    import-jdl [jdlFiles...]  Create entities from the JDL file passed in argument
    info                      Display information about your current project and system
    kubernetes                Deploy the current application to Kubernetes
    languages [languages...]  Select languages from a list of available languages. The i18n files will be copied to the /webapp/i18n folder
    openshift                 Deploy the current application to OpenShift
    rancher-compose           Deploy the current application to Rancher
    server                    Create a new JHipster server-side application
    service [name]            Create a new Spring service bean
    upgrade                   Upgrade the JHipster version, and upgrade the generated application
    completion                Print command completion script

  Options:

    -h, --help     output usage information
    -d, --debug    enable debugger
    -V, --version  output the version number

1 个答案:

答案 0 :(得分:2)

您指的是一个2岁的项目样本。当前版本的JHipster 4.x需要JDK 8,因此无法生成与JDK 7兼容的项目。

唯一的解决方案是安装一个过时版本的JHipster,如2.22.0,这是用于生成此JDK 7示例项目的版本:

npm install -g generator-jhipster@2.22.0

然后按照此版本的说明进行操作:http://www.jhipster.tech/documentation-archive/v2.22.0/