首先,我是Jhipster的新手。我已经创建了jhipster网关(前端)与angular无应用程序(后端)。
我希望这将不会工作,因为后端不存在/工作,所有的服务调用都将通过后端访问数据库。
当我尝试使用http://localhost:8080访问前端时,我可以看到一切都在工作。我不确定是怎么做到的。有人能解释一下吗?
JHipster v6.10.5用于此目的。
谢谢Shirish
JHispter命令行的应用程序响应:
? Which *type* of application would you like to create? Microservice gateway
? [Beta] Do you want to make it reactive with Spring WebFlux? No
? What is the base name of your application? gateway
? As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8080
? What is your default Java package name? com.btn.test
? Which service discovery server do you want to use? JHipster Registry (uses Eureka, provides Spring Cloud Config support and monitoring dashboards)
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL ? Which *development* database would you like to use? MySQL
? Do you want to use the Spring cache abstraction? Yes, with the Hazelcast implementation (distributed cache, for multiple nodes, supports rate-limiting for gateway applications)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use?
? Which *Framework* would you like to use for the client? Angular
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Would you like to enable internationalization support? No
? Besides JUnit and Jest, which testing frameworks would you like to use? Gatling, Cucumber, Protractor
? Would you like to install other generators from the JHipster Marketplace? (y/N) Noemp.jdl
/**
* The Employee entity.
* @author Shirish Bathe
*/
entity Employee {
name String required unique
dept String
}现在我有了使用http://localhost:8080的访问网关,并尝试访问employee实体。我可以在表格中看到(假的)数据。
因此,即使后端应用程序不存在,应用程序也可以正常工作。多么?我错过了什么吗?
发布于 2021-02-24 17:49:52
网关包含整个UI。微服务在您定义实体时开始发挥作用。这些不是由网关管理的(但UI是)。这张概览图很好地描述了架构:
https://stackoverflow.com/questions/66348339
复制相似问题