Search code examples
javajhipsterjdl

JHipster JDL studio not accepting application tag


I am trying to create .jh file with tag as given below. But Eclipse plugin or online JDL-Studio is not accepting this section.

application {
  config {
    baseName myapp,
    path "../", // the generated folder will be "../myapp"
    applicationType microservice,
    prodDatabaseType postgresql,
    buildTool gradle
  }
}

I even tried following example which is given in article but that is also not working. Does any one using this in JDL-Studio.

application {
  config {
    baseName myMonolith,
    path "../",
    applicationType monolith
  }
  entities * except C, D
}

application {
  config {
    baseName myGateway,
    path "../",
    applicationType gateway,
    serverPort 9042
  }
  entities * except A, B
}

application {
  config {
    baseName microserviceA,
    path "../",
    applicationType microservice
  }
  entities C
}

application {
  config {
    baseName microserviceB,
    path "../",
    applicationType microservice,
    serverPort 8082
  }
  entities D
}

entity A
entity B
entity C
entity D

dto * with mapstruct
paginate D with pager

Solution

  • This tag comes from the JDL v2, and it is not yet implemented in the JDL Studio.

    The main reason is that JDL v2 will come with JHipster v5, which is not released yet. JHipster Online, which includes the JDL Studio, works with the latest stable release, so it's still using JHipster v4 and JDL v1.

    Once JHipster v5 is released, we will upgrade JHipster Online, and then JDL Studio, so it can take a few weeks before it's all aligned. It all depends on contributions, so there is no guarantee, but that shouldn't be a huge work.

    One more thing to notice, if you want JHipster Online to generate your applications: this tag might be excluded. We already have a Web form for generating applications, and we feel that it's easier that way - so maybe we will only accept a subset of tags (ie no application tag), so JHipster Online could only generate entities with the JDL. Still, you could use the JDL Studio with the full set of tags, and run the JDL on your computer using jhipster import-jdl - that would be a more advanced usage.