无标题文章

jHipster - 微服务搭建

CC_简书关注

2017.01.20 11:01字数 460阅读 3385评论 0喜欢 8

jHipster 整合了springcloud 框架 也包含了EurekaServer ConfigServer等服务,我们通过一些简单的命令就能部署一套基于微服务的系统

Paste_Image.png

[TOC]

jHipster微服务的几个模块

jHipster Registry

jhipster registry是一个基于spring cloud的配置中心。所有的微服务APP都需要注册到这里。

我们不需要手动的去创建这个项目,jHipster已经为我们准备好了。

https://github.com/jhipster/jhipster-registry

# 检出

git clone https://github.com/jhipster/jhipster-registry.git

# 编译启动

mvn clean package

java -jar target/jhipster-registry-2.5.7.war

通过浏览器登录

http://localhost:8761/

帐号 admin 密码 admin

Paste_Image.png

uaa

部署完jHipster registry ,我们需要创建一个用于控制访问权限的项目。前提是我们已经安装好了jHipster

## 创建文件夹

mkdir cn.ctodb.uaa

cd cn.ctodb.uaa

yo jhipster

下面就是项目创建过程中的选项

██  ██    ██  ████████  ███████    ██████  ████████  ████████  ███████

██  ██    ██    ██    ██    ██  ██          ██    ██        ██    ██

██  ████████    ██    ███████    █████      ██    ██████    ███████

██    ██  ██    ██    ██    ██            ██    ██    ██        ██  ██

██████  ██    ██  ████████  ██        ██████      ██    ████████  ██    ██

http://jhipster.github.io

Welcome to the JHipster Generator v3.12.2

Documentation for creating an application: https://jhipster.github.io/creating-an-app/

Application files will be generated in folder: C:\ws\ctodb-msp\uaa

? (1/14) Which *type* of application would you like to create? [BETA] JHipster UAA server (for microservice OAuth2 authentication)

? (2/14) What is the base name of your application? uaa

? (3/14) Would you like to install other generators from the JHipster Market Place? No

? (3/14) 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. 9999

? (4/14) What is your default Java package name? cn.ctodb.uaa

? (5/14) Which Service Discovery and Configuration solution would you like to use? JHipster Registry (using Eureka and Spring Cloud Config)

? (6/14) Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)

? (7/14) Which *production* database would you like to use? MySQL

? (8/14) Which *development* database would you like to use? MySQL

? (9/14) Do you want to use Hibernate 2nd level cache? Yes, with HazelCast (distributed cache, for multiple nodes)

? (10/14) Would you like to use Maven or Gradle for building the backend? Maven

? (11/14) Which other technologies would you like to use? (Press to select, to toggle all, to inverse selection)

? (12/14) Would you like to enable internationalization support? Yes

? Please choose the native language of the application? Chinese (Simplified)

? Please choose additional languages to install (Press to select, to toggle all, to inverse selection)

? (13/14) Which testing frameworks would you like to use? (Press to select, to toggle all, to inverse selection)Gatling

Installing languages: zh-cn for server

create README.md

create .gitignore

create .gitattributes

create .editorconfig

create .travis.yml

create Jenkinsfile

create src\main\docker\Dockerfile

create src\main\docker\app.yml

create src\main\docker\mysql.yml

create src\main\docker\central-server-config\README.md

create src\main\docker\jhipster-registry.yml

create src\main\docker\central-server-config\docker-config\application.yml

create src\main\docker\central-server-config\localhost-config\application.ym

create src\main\docker\sonar.yml

create mvnw

create mvnw.cmd

create .mvn\wrapper\maven-wrapper.jar

create .mvn\wrapper\maven-wrapper.properties

create pom.xml

create src\main\resources\banner.txt

create src\main\java\cn\ctodb\uaa\config\jcache\JCacheGaugeSet.java

create src\main\resources\templates\error.html

create src\main\resources\logback-spring.xml

create src\main\resources\config\application.yml

create src\main\resources\config\application-dev.yml

create src\main\resources\config\application-prod.yml

create src\main\resources\config\liquibase\changelog\00000000000000_initial_

create src\main\resources\config\liquibase\master.xml

create src\main\resources\i18n\messages.properties

create src\main\java\cn\ctodb\uaa\security\SpringSecurityAuditorAware.java

create src\main\java\cn\ctodb\uaa\security\SecurityUtils.java

create src\main\java\cn\ctodb\uaa\security\AuthoritiesConstants.java

create src\main\java\cn\ctodb\uaa\config\UaaWebSecurityConfiguration.java

create src\main\java\cn\ctodb\uaa\config\UaaConfiguration.java

create src\main\java\cn\ctodb\uaa\config\LoadBalancedResourceDetails.java

create src\main\java\cn\ctodb\uaa\security\Http401UnauthorizedEntryPoint.jav

create src\main\java\cn\ctodb\uaa\security\UserDetailsService.java

create src\main\java\cn\ctodb\uaa\security\UserNotActivatedException.java

create src\main\java\cn\ctodb\uaa\security\package-info.java

create src\main\resources\config\bootstrap.yml

create src\main\resources\config\bootstrap-dev.yml

create src\main\resources\config\bootstrap-prod.yml

create src\main\java\cn\ctodb\uaa\config\metrics\SpectatorLogMetricWriter.ja

create src\main\java\cn\ctodb\uaa\UaaApp.java

create src\main\java\cn\ctodb\uaa\ApplicationWebXml.java

create src\main\java\cn\ctodb\uaa\aop\logging\LoggingAspect.java

create src\main\java\cn\ctodb\uaa\config\DefaultProfileUtil.java

create src\main\java\cn\ctodb\uaa\config\apidoc\package-info.java

create src\main\java\cn\ctodb\uaa\config\apidoc\SwaggerConfiguration.java

create src\main\java\cn\ctodb\uaa\config\apidoc\PageableParameterBuilderPlug

create src\main\java\cn\ctodb\uaa\async\package-info.java

create src\main\java\cn\ctodb\uaa\async\ExceptionHandlingAsyncTaskExecutor.j

create src\main\java\cn\ctodb\uaa\config\package-info.java

create src\main\java\cn\ctodb\uaa\config\AsyncConfiguration.java

create src\main\java\cn\ctodb\uaa\config\CacheConfiguration.java

create src\main\java\cn\ctodb\uaa\config\Constants.java

create src\main\java\cn\ctodb\uaa\config\DateTimeFormatConfiguration.java

create src\main\java\cn\ctodb\uaa\config\LoggingConfiguration.java

create src\main\java\cn\ctodb\uaa\config\CloudDatabaseConfiguration.java

create src\main\java\cn\ctodb\uaa\config\DatabaseConfiguration.java

create src\main\java\cn\ctodb\uaa\config\audit\package-info.java

create src\main\java\cn\ctodb\uaa\config\audit\AuditEventConverter.java

create src\main\java\cn\ctodb\uaa\config\JHipsterProperties.java

create src\main\java\cn\ctodb\uaa\config\LocaleConfiguration.java

create src\main\java\cn\ctodb\uaa\config\LoggingAspectConfiguration.java

create src\main\java\cn\ctodb\uaa\config\MetricsConfiguration.java

create src\main\java\cn\ctodb\uaa\config\ThymeleafConfiguration.java

create src\main\java\cn\ctodb\uaa\config\WebConfigurer.java

create src\main\java\cn\ctodb\uaa\config\locale\package-info.java

create src\main\java\cn\ctodb\uaa\config\locale\AngularCookieLocaleResolver.

create src\main\java\cn\ctodb\uaa\config\liquibase\AsyncSpringLiquibase.java

create src\main\java\cn\ctodb\uaa\config\liquibase\package-info.java

create src\main\java\cn\ctodb\uaa\domain\package-info.java

create src\main\java\cn\ctodb\uaa\domain\util\JSR310DateConverters.java

create src\main\java\cn\ctodb\uaa\domain\util\FixedH2Dialect.java

create src\main\java\cn\ctodb\uaa\domain\AbstractAuditingEntity.java

create src\main\java\cn\ctodb\uaa\domain\PersistentAuditEvent.java

create src\main\java\cn\ctodb\uaa\repository\package-info.java

create src\main\java\cn\ctodb\uaa\service\package-info.java

create src\main\java\cn\ctodb\uaa\service\util\RandomUtil.java

create src\main\java\cn\ctodb\uaa\web\rest\errors\ErrorConstants.java

create src\main\java\cn\ctodb\uaa\web\rest\errors\CustomParameterizedExcepti

create src\main\java\cn\ctodb\uaa\web\rest\errors\ErrorVM.java

create src\main\java\cn\ctodb\uaa\web\rest\errors\ExceptionTranslator.java

create src\main\java\cn\ctodb\uaa\web\rest\errors\FieldErrorVM.java

create src\main\java\cn\ctodb\uaa\web\rest\errors\ParameterizedErrorVM.java

create src\main\java\cn\ctodb\uaa\web\filter\package-info.java

create src\main\java\cn\ctodb\uaa\web\filter\CachingHttpHeadersFilter.java

create src\main\java\cn\ctodb\uaa\web\rest\vm\package-info.java

create src\main\java\cn\ctodb\uaa\web\rest\vm\LoggerVM.java

create src\main\java\cn\ctodb\uaa\web\rest\util\HeaderUtil.java

create src\main\java\cn\ctodb\uaa\web\rest\util\PaginationUtil.java

create src\main\java\cn\ctodb\uaa\web\rest\package-info.java

create src\main\java\cn\ctodb\uaa\web\rest\LogsResource.java

create src\main\java\cn\ctodb\uaa\web\rest\ProfileInfoResource.java

create src\test\java\cn\ctodb\uaa\web\rest\TestUtil.java

create src\test\resources\config\application.yml

create src\test\resources\logback-test.xml

create src\test\resources\config\bootstrap.yml

create src\test\java\cn\ctodb\uaa\security\OAuth2TokenMockUtil.java

create src\test\java\cn\ctodb\uaa\config\SecurityBeanOverrideConfiguration.j

create src\test\gatling\conf\gatling.conf

create src\test\gatling\conf\logback.xml

create src\main\resources\config\liquibase\users.csv

create src\main\resources\config\liquibase\authorities.csv

create src\main\resources\config\liquibase\users_authorities.csv

create src\main\resources\mails\activationEmail.html

create src\main\resources\mails\creationEmail.html

create src\main\resources\mails\passwordResetEmail.html

create src\main\java\cn\ctodb\uaa\domain\User.java

create src\main\java\cn\ctodb\uaa\domain\Authority.java

create src\main\java\cn\ctodb\uaa\repository\CustomAuditEventRepository.java

create src\main\java\cn\ctodb\uaa\repository\AuthorityRepository.java

create src\main\java\cn\ctodb\uaa\repository\PersistenceAuditEventRepository

create src\main\java\cn\ctodb\uaa\repository\UserRepository.java

create src\main\java\cn\ctodb\uaa\service\UserService.java

create src\main\java\cn\ctodb\uaa\service\MailService.java

create src\main\java\cn\ctodb\uaa\service\AuditEventService.java

create src\main\java\cn\ctodb\uaa\service\dto\package-info.java

create src\main\java\cn\ctodb\uaa\service\dto\UserDTO.java

create src\main\java\cn\ctodb\uaa\web\rest\vm\ManagedUserVM.java

create src\main\java\cn\ctodb\uaa\web\rest\UserResource.java

create src\main\java\cn\ctodb\uaa\web\rest\AccountResource.java

create src\main\java\cn\ctodb\uaa\web\rest\vm\KeyAndPasswordVM.java

create src\main\java\cn\ctodb\uaa\service\mapper\package-info.java

create src\main\java\cn\ctodb\uaa\service\mapper\UserMapper.java

create src\main\java\cn\ctodb\uaa\web\rest\AuditResource.java

create src\test\java\cn\ctodb\uaa\service\UserServiceIntTest.java

create src\test\java\cn\ctodb\uaa\web\rest\UserResourceIntTest.java

create src\test\java\cn\ctodb\uaa\web\rest\AccountResourceIntTest.java

create src\test\java\cn\ctodb\uaa\security\SecurityUtilsUnitTest.java

create src\test\java\cn\ctodb\uaa\web\rest\AuditResourceIntTest.java

create src\main\resources\i18n\messages_zh_cn.properties

Server app generated successfully.

KeyStore 'src/main/resources/keystore.jks' generated successfully.

修改里面的application-dev.yml配置

mysql 连接的配置

eureka 服务的配置,改为jHipster registry服务的地址。同时还需要修改bootstrap-dev.yml(如果都在一台电脑启动这个就不用变)

编译启动UAA

mvn clean package

java -jar target/uaa-0.0.1-SNAPSHOT.war

app(microservice)

创建一个微服务

操作同uaa

## 创建文件夹

mkdir cn.ctodb.app

cd cn.ctodb.app

yo jhipster

选项与uaa有差异。类型需要选择微服务类型,权限需要选择上面创建的uaa路径。详细选择参考下面记录

██  ██    ██  ████████  ███████    ██████  ████████  ████████  ███████

██  ██    ██    ██    ██    ██  ██          ██    ██        ██    ██

██  ████████    ██    ███████    █████      ██    ██████    ███████

██    ██  ██    ██    ██    ██            ██    ██    ██        ██  ██

██████  ██    ██  ████████  ██        ██████      ██    ████████  ██    ██

http://jhipster.github.io

Welcome to the JHipster Generator v3.12.2

Documentation for creating an application: https://jhipster.github.io/creating-an-app/

Application files will be generated in folder: C:\ws\ctodb-msp\cn.ctodb.app

? (1/14) Which *type* of application would you like to create? Microservice application

? (2/14) What is the base name of your application? app

? (3/14) Would you like to install other generators from the JHipster Market Place? No

? (3/14) 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. 8081

? (4/14) What is your default Java package name? cn.ctodb.app

? (5/14) Which *type* of authentication would you like to use? [BETA] Authentication with JHipster UAA server (the server must be generated separately)

? (6/14) What is the folder path of your UAA application?. ../cn.ctodb.uaa

? (7/14) Which Service Discovery and Configuration solution would you like to use? JHipster Registry (using Eureka and Spring Cloud Config)

? (8/14) Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle)

? (9/14) Which *production* database would you like to use? MySQL

? (10/14) Which *development* database would you like to use? MySQL

? (11/14) Do you want to use Hibernate 2nd level cache? Yes, with HazelCast (distributed cache, for multiple nodes)

? (12/14) Would you like to use Maven or Gradle for building the backend? Maven

? (13/14) Which other technologies would you like to use? (Press to select, to toggle all, to inverse selection)

? (14/14) Would you like to enable internationalization support? Yes

? Please choose the native language of the application? Chinese (Simplified)

? Please choose additional languages to install (Press to select, to toggle all, to inverse selection)

? (15/14) Which testing frameworks would you like to use? (Press to select, to toggle all, to inverse selection)Gatling

Installing languages: zh-cn for server

create README.md

create .gitignore

create .gitattributes

create .editorconfig

create .travis.yml

create Jenkinsfile

create src\main\docker\Dockerfile

create src\main\docker\app.yml

create src\main\docker\mysql.yml

create src\main\docker\central-server-config\README.md

create src\main\docker\jhipster-registry.yml

create src\main\docker\central-server-config\docker-config\application.yml

create src\main\docker\central-server-config\localhost-config\application.yml

create src\main\docker\sonar.yml

create mvnw

create mvnw.cmd

create .mvn\wrapper\maven-wrapper.jar

create .mvn\wrapper\maven-wrapper.properties

create pom.xml

create src\main\resources\banner.txt

create src\main\java\cn\ctodb\app\config\jcache\JCacheGaugeSet.java

create src\main\resources\templates\error.html

create src\main\resources\logback-spring.xml

create src\main\resources\config\application.yml

create src\main\resources\config\application-dev.yml

create src\main\resources\config\application-prod.yml

create src\main\resources\config\liquibase\changelog\00000000000000_initial_schema.xml

create src\main\resources\config\liquibase\master.xml

create src\main\resources\i18n\messages.properties

create src\main\java\cn\ctodb\app\security\SpringSecurityAuditorAware.java

create src\main\java\cn\ctodb\app\security\SecurityUtils.java

create src\main\java\cn\ctodb\app\security\AuthoritiesConstants.java

create src\main\java\cn\ctodb\app\config\MicroserviceSecurityConfiguration.java

create src\main\java\cn\ctodb\app\config\LoadBalancedResourceDetails.java

create src\main\java\cn\ctodb\app\config\FeignConfiguration.java

create src\main\java\cn\ctodb\app\client\AuthorizedFeignClient.java

create src\main\java\cn\ctodb\app\client\OAuth2InterceptedFeignConfiguration.java

create src\main\resources\config\bootstrap.yml

create src\main\resources\config\bootstrap-dev.yml

create src\main\resources\config\bootstrap-prod.yml

create src\main\java\cn\ctodb\app\config\metrics\SpectatorLogMetricWriter.java

create src\main\java\cn\ctodb\app\AppApp.java

create src\main\java\cn\ctodb\app\ApplicationWebXml.java

create src\main\java\cn\ctodb\app\aop\logging\LoggingAspect.java

create src\main\java\cn\ctodb\app\config\DefaultProfileUtil.java

create src\main\java\cn\ctodb\app\config\apidoc\package-info.java

create src\main\java\cn\ctodb\app\config\apidoc\SwaggerConfiguration.java

create src\main\java\cn\ctodb\app\config\apidoc\PageableParameterBuilderPlugin.java

create src\main\java\cn\ctodb\app\async\package-info.java

create src\main\java\cn\ctodb\app\async\ExceptionHandlingAsyncTaskExecutor.java

create src\main\java\cn\ctodb\app\config\package-info.java

create src\main\java\cn\ctodb\app\config\AsyncConfiguration.java

create src\main\java\cn\ctodb\app\config\CacheConfiguration.java

create src\main\java\cn\ctodb\app\config\Constants.java

create src\main\java\cn\ctodb\app\config\DateTimeFormatConfiguration.java

create src\main\java\cn\ctodb\app\config\LoggingConfiguration.java

create src\main\java\cn\ctodb\app\config\CloudDatabaseConfiguration.java

create src\main\java\cn\ctodb\app\config\DatabaseConfiguration.java

create src\main\java\cn\ctodb\app\config\audit\package-info.java

create src\main\java\cn\ctodb\app\config\audit\AuditEventConverter.java

create src\main\java\cn\ctodb\app\config\JHipsterProperties.java

create src\main\java\cn\ctodb\app\config\LocaleConfiguration.java

create src\main\java\cn\ctodb\app\config\LoggingAspectConfiguration.java

create src\main\java\cn\ctodb\app\config\MetricsConfiguration.java

create src\main\java\cn\ctodb\app\config\ThymeleafConfiguration.java

create src\main\java\cn\ctodb\app\config\WebConfigurer.java

create src\main\java\cn\ctodb\app\config\locale\package-info.java

create src\main\java\cn\ctodb\app\config\locale\AngularCookieLocaleResolver.java

create src\main\java\cn\ctodb\app\config\liquibase\AsyncSpringLiquibase.java

create src\main\java\cn\ctodb\app\config\liquibase\package-info.java

create src\main\java\cn\ctodb\app\domain\package-info.java

create src\main\java\cn\ctodb\app\domain\util\JSR310DateConverters.java

create src\main\java\cn\ctodb\app\domain\util\FixedH2Dialect.java

create src\main\java\cn\ctodb\app\domain\AbstractAuditingEntity.java

create src\main\java\cn\ctodb\app\domain\PersistentAuditEvent.java

create src\main\java\cn\ctodb\app\repository\package-info.java

create src\main\java\cn\ctodb\app\service\package-info.java

create src\main\java\cn\ctodb\app\web\rest\errors\ErrorConstants.java

create src\main\java\cn\ctodb\app\web\rest\errors\CustomParameterizedException.java

create src\main\java\cn\ctodb\app\web\rest\errors\ErrorVM.java

create src\main\java\cn\ctodb\app\web\rest\errors\ExceptionTranslator.java

create src\main\java\cn\ctodb\app\web\rest\errors\FieldErrorVM.java

create src\main\java\cn\ctodb\app\web\rest\errors\ParameterizedErrorVM.java

create src\main\java\cn\ctodb\app\web\filter\package-info.java

create src\main\java\cn\ctodb\app\web\filter\CachingHttpHeadersFilter.java

create src\main\java\cn\ctodb\app\web\rest\vm\package-info.java

create src\main\java\cn\ctodb\app\web\rest\vm\LoggerVM.java

create src\main\java\cn\ctodb\app\web\rest\util\HeaderUtil.java

create src\main\java\cn\ctodb\app\web\rest\util\PaginationUtil.java

create src\main\java\cn\ctodb\app\web\rest\package-info.java

create src\main\java\cn\ctodb\app\web\rest\LogsResource.java

create src\main\java\cn\ctodb\app\web\rest\ProfileInfoResource.java

create src\test\java\cn\ctodb\app\web\rest\TestUtil.java

create src\test\resources\config\application.yml

create src\test\resources\logback-test.xml

create src\test\resources\config\bootstrap.yml

create src\test\java\cn\ctodb\app\security\OAuth2TokenMockUtil.java

create src\test\java\cn\ctodb\app\config\SecurityBeanOverrideConfiguration.java

create src\test\gatling\conf\gatling.conf

create src\test\gatling\conf\logback.xml

create src\main\resources\i18n\messages_zh_cn.properties

Server app generated successfully.

同样还需要修改数据库配置,然后启动项目(参考uaa)

gateway

创建一个网关,用来做为所有请求的入口

操作同uaa

## 创建文件夹

mkdir cn.ctodb.app

cd cn.ctodb.app

yo jhipster

选项与uaa ,app 有差异。类型需要选择网关类型,权限需要选择上面创建的uaa路径。同时生成的项目文件包含了页面。详细选择参考下面记录

██  ██    ██  ████████  ███████    ██████  ████████  ████████  ███████

██  ██    ██    ██    ██    ██  ██          ██    ██        ██    ██

██  ████████    ██    ███████    █████      ██    ██████    ███████

██    ██  ██    ██    ██    ██            ██    ██    ██        ██  ██

██████  ██    ██  ████████  ██        ██████      ██    ████████  ██    ██

http://jhipster.github.io

Welcome to the JHipster Generator v3.12.2

Documentation for creating an application: https://jhipster.github.io/creating-an-app/

Application files will be generated in folder: C:\ws\ctodb-msp\gateway

? (1/14) Which *type* of application would you like to create? Microservice gateway

? (2/14) What is the base name of your application? gateway

? (3/14) Would you like to install other generators from the JHipster Market Place? No

? (3/14) 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

? (4/14) What is your default Java package name? cn.ctodb.gateway

? (5/14) Which *type* of authentication would you like to use? [BETA] Authentication with JHipster UAA server (the server must be generated separately)

? (6/14) What is the folder path of your UAA application?. ../cn.ctodb.uaa

? (7/14) Which Service Discovery and Configuration solution would you like to use? JHipster Registry (using Eureka and Spring Cloud Config)

? (8/14) Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)

? (9/14) Which *production* database would you like to use? MySQL

? (10/14) Which *development* database would you like to use? MySQL

? (11/14) Do you want to use Hibernate 2nd level cache? Yes, with HazelCast (distributed cache, for multiple nodes)

? (12/14) Would you like to use Maven or Gradle for building the backend? Maven

? (13/14) Which other technologies would you like to use? (Press to select, to toggle all, to inverse selection)

? (14/14) Would you like to use the LibSass stylesheet preprocessor for your CSS? No

? (15/14) Would you like to enable internationalization support? Yes

? Please choose the native language of the application? Chinese (Simplified)

? Please choose additional languages to install (Press to select, to toggle all, to inverse selection)

? (16/14) Which testing frameworks would you like to use? (Press to select, to toggle all, to inverse selection)Gatling

Installing languages: zh-cn

create bower.json

create package.json

create README.md

create .gitignore

create .gitattributes

create .editorconfig

create .travis.yml

create Jenkinsfile

create src\main\docker\Dockerfile

create src\main\docker\app.yml

create src\main\docker\mysql.yml

create src\main\docker\cassandra.yml

create src\main\docker\cassandra-cluster.yml

create src\main\docker\cassandra-migration.yml

create src\main\docker\cassandra\Cassandra-Migration.Dockerfile

create src\main\docker\cassandra\scripts\autoMigrate.sh

create src\main\docker\cassandra\scripts\execute-cql.sh

create src\main\docker\central-server-config\README.md

create src\main\docker\jhipster-registry.yml

create src\main\docker\central-server-config\docker-config\application.yml

create src\main\docker\central-server-config\localhost-config\application.yml

create src\main\docker\sonar.yml

create mvnw

create mvnw.cmd

create .mvn\wrapper\maven-wrapper.jar

create .mvn\wrapper\maven-wrapper.properties

create pom.xml

create src\main\resources\banner.txt

create src\main\java\cn\ctodb\gateway\config\jcache\JCacheGaugeSet.java

create src\main\resources\templates\error.html

create src\main\resources\logback-spring.xml

create src\main\resources\config\application.yml

create src\main\resources\config\application-dev.yml

create src\main\resources\config\application-prod.yml

create src\main\resources\config\liquibase\changelog\00000000000000_initial_schema.xml

create src\main\resources\config\liquibase\master.xml

create src\main\resources\config\cql\create-keyspace-prod.cql

create src\main\resources\config\cql\create-keyspace.cql

create src\main\resources\config\cql\drop-keyspace.cql

create src\main\resources\config\cql\changelog\README.md

create src\main\resources\i18n\messages.properties

create src\main\java\cn\ctodb\gateway\security\SpringSecurityAuditorAware.java

create src\main\java\cn\ctodb\gateway\security\SecurityUtils.java

create src\main\java\cn\ctodb\gateway\security\AuthoritiesConstants.java

create src\main\java\cn\ctodb\gateway\config\GatewayConfiguration.java

create src\main\java\cn\ctodb\gateway\config\apidoc\GatewaySwaggerResourcesProvider.java

create src\main\java\cn\ctodb\gateway\gateway\ratelimiting\RateLimitingFilter.java

create src\main\java\cn\ctodb\gateway\gateway\TokenRelayFilter.java

create src\main\java\cn\ctodb\gateway\gateway\ratelimiting\RateLimitingRepository.java

create src\main\java\cn\ctodb\gateway\gateway\accesscontrol\AccessControlFilter.java

create src\main\java\cn\ctodb\gateway\gateway\responserewriting\SwaggerBasePathRewritingFilter.java

create src\main\java\cn\ctodb\gateway\web\rest\vm\RouteVM.java

create src\main\java\cn\ctodb\gateway\web\rest\GatewayResource.java

create src\main\java\cn\ctodb\gateway\config\MicroserviceSecurityConfiguration.java

create src\main\resources\config\bootstrap.yml

create src\main\resources\config\bootstrap-dev.yml

create src\main\resources\config\bootstrap-prod.yml

create src\main\java\cn\ctodb\gateway\config\metrics\SpectatorLogMetricWriter.java

create src\main\java\cn\ctodb\gateway\GatewayApp.java

create src\main\java\cn\ctodb\gateway\ApplicationWebXml.java

create src\main\java\cn\ctodb\gateway\aop\logging\LoggingAspect.java

create src\main\java\cn\ctodb\gateway\config\DefaultProfileUtil.java

create src\main\java\cn\ctodb\gateway\config\apidoc\package-info.java

create src\main\java\cn\ctodb\gateway\config\apidoc\SwaggerConfiguration.java

create src\main\java\cn\ctodb\gateway\config\apidoc\PageableParameterBuilderPlugin.java

create src\main\java\cn\ctodb\gateway\async\package-info.java

create src\main\java\cn\ctodb\gateway\async\ExceptionHandlingAsyncTaskExecutor.java

create src\main\java\cn\ctodb\gateway\config\package-info.java

create src\main\java\cn\ctodb\gateway\config\AsyncConfiguration.java

create src\main\java\cn\ctodb\gateway\config\CacheConfiguration.java

create src\main\java\cn\ctodb\gateway\config\Constants.java

create src\main\java\cn\ctodb\gateway\config\DateTimeFormatConfiguration.java

create src\main\java\cn\ctodb\gateway\config\LoggingConfiguration.java

create src\main\java\cn\ctodb\gateway\config\CloudDatabaseConfiguration.java

create src\main\java\cn\ctodb\gateway\config\DatabaseConfiguration.java

create src\main\java\cn\ctodb\gateway\config\audit\package-info.java

create src\main\java\cn\ctodb\gateway\config\audit\AuditEventConverter.java

create src\main\java\cn\ctodb\gateway\config\JHipsterProperties.java

create src\main\java\cn\ctodb\gateway\config\LocaleConfiguration.java

create src\main\java\cn\ctodb\gateway\config\LoggingAspectConfiguration.java

create src\main\java\cn\ctodb\gateway\config\MetricsConfiguration.java

create src\main\java\cn\ctodb\gateway\config\ThymeleafConfiguration.java

create src\main\java\cn\ctodb\gateway\config\WebConfigurer.java

create src\main\java\cn\ctodb\gateway\config\locale\package-info.java

create src\main\java\cn\ctodb\gateway\config\locale\AngularCookieLocaleResolver.java

create src\main\java\cn\ctodb\gateway\config\cassandra\CassandraConfiguration.java

create src\main\java\cn\ctodb\gateway\config\cassandra\CustomZonedDateTimeCodec.java

create src\main\java\cn\ctodb\gateway\config\cassandra\package-info.java

create src\main\java\cn\ctodb\gateway\config\liquibase\AsyncSpringLiquibase.java

create src\main\java\cn\ctodb\gateway\config\liquibase\package-info.java

create src\main\java\cn\ctodb\gateway\domain\package-info.java

create src\main\java\cn\ctodb\gateway\domain\util\JSR310DateConverters.java

create src\main\java\cn\ctodb\gateway\domain\util\FixedH2Dialect.java

create src\main\java\cn\ctodb\gateway\domain\AbstractAuditingEntity.java

create src\main\java\cn\ctodb\gateway\domain\PersistentAuditEvent.java

create src\main\java\cn\ctodb\gateway\repository\package-info.java

create src\main\java\cn\ctodb\gateway\service\package-info.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\ErrorConstants.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\CustomParameterizedException.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\ErrorVM.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\ExceptionTranslator.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\FieldErrorVM.java

create src\main\java\cn\ctodb\gateway\web\rest\errors\ParameterizedErrorVM.java

create src\main\java\cn\ctodb\gateway\web\filter\package-info.java

create src\main\java\cn\ctodb\gateway\web\filter\CachingHttpHeadersFilter.java

create src\main\java\cn\ctodb\gateway\web\rest\vm\package-info.java

create src\main\java\cn\ctodb\gateway\web\rest\vm\LoggerVM.java

create src\main\java\cn\ctodb\gateway\web\rest\util\HeaderUtil.java

create src\main\java\cn\ctodb\gateway\web\rest\util\PaginationUtil.java

create src\main\java\cn\ctodb\gateway\web\rest\package-info.java

create src\main\java\cn\ctodb\gateway\web\rest\LogsResource.java

create src\main\java\cn\ctodb\gateway\web\rest\ProfileInfoResource.java

create src\test\java\cn\ctodb\gateway\web\rest\TestUtil.java

create src\test\resources\config\application.yml

create src\test\resources\logback-test.xml

create src\test\java\cn\ctodb\gateway\gateway\responserewriting\SwaggerBasePathRewritingFilterTest.java

create src\test\resources\config\bootstrap.yml

create src\test\java\cn\ctodb\gateway\security\OAuth2TokenMockUtil.java

create src\test\java\cn\ctodb\gateway\config\SecurityBeanOverrideConfiguration.java

create src\test\gatling\conf\gatling.conf

create src\test\gatling\conf\logback.xml

create .bowerrc

create .eslintrc.json

create .eslintignore

create gulpfile.js

create gulp\handle-errors.js

create gulp\utils.js

create gulp\serve.js

create gulp\config.js

create gulp\build.js

create gulp\copy.js

create gulp\inject.js

create src\main\webapp\content\css\main.css

create src\main\webapp\content\css\documentation.css

create src\main\webapp\favicon.ico

create src\main\webapp\robots.txt

create src\main\webapp\404.html

create src\main\webapp\swagger-ui\index.html

create src\main\webapp\swagger-ui\images\throbber.gif

create src\main\webapp\index.html

create src\main\webapp\app\app.module.js

create src\main\webapp\app\app.state.js

create src\main\webapp\app\app.constants.js

create src\main\webapp\app\blocks\handlers\state.handler.js

create src\main\webapp\app\blocks\handlers\translation.handler.js

create src\main\webapp\app\blocks\config\translation.config.js

create src\main\webapp\app\blocks\config\translation-storage.provider.js

create src\main\webapp\app\blocks\config\alert.config.js

create src\main\webapp\app\blocks\config\http.config.js

create src\main\webapp\app\blocks\config\localstorage.config.js

create src\main\webapp\app\blocks\config\compile.config.js

create src\main\webapp\app\blocks\config\uib-pager.config.js

create src\main\webapp\app\blocks\config\uib-pagination.config.js

create src\main\webapp\app\account\account.state.js

create src\main\webapp\app\account\activate\activate.html

create src\main\webapp\app\account\activate\activate.state.js

create src\main\webapp\app\account\activate\activate.controller.js

create src\main\webapp\app\account\password\password.html

create src\main\webapp\app\account\password\password.state.js

create src\main\webapp\app\account\password\password.controller.js

create src\main\webapp\app\account\password\password-strength-bar.directive.js

create src\main\webapp\app\account\register\register.html

create src\main\webapp\app\account\register\register.state.js

create src\main\webapp\app\account\register\register.controller.js

create src\main\webapp\app\account\reset\request\reset.request.html

create src\main\webapp\app\account\reset\request\reset.request.state.js

create src\main\webapp\app\account\reset\request\reset.request.controller.js

create src\main\webapp\app\account\reset\finish\reset.finish.html

create src\main\webapp\app\account\reset\finish\reset.finish.state.js

create src\main\webapp\app\account\reset\finish\reset.finish.controller.js

create src\main\webapp\app\account\settings\settings.html

create src\main\webapp\app\account\settings\settings.state.js

create src\main\webapp\app\account\settings\settings.controller.js

create src\main\webapp\app\admin\admin.state.js

create src\main\webapp\app\admin\audits\audits.html

create src\main\webapp\app\admin\audits\audits.state.js

create src\main\webapp\app\admin\audits\audits.controller.js

create src\main\webapp\app\admin\audits\audits.service.js

create src\main\webapp\app\admin\configuration\configuration.html

create src\main\webapp\app\admin\configuration\configuration.state.js

create src\main\webapp\app\admin\configuration\configuration.controller.js

create src\main\webapp\app\admin\configuration\configuration.service.js

create src\main\webapp\app\admin\docs\docs.html

create src\main\webapp\app\admin\docs\docs.state.js

create src\main\webapp\app\admin\health\health.html

create src\main\webapp\app\admin\health\health.modal.html

create src\main\webapp\app\admin\health\health.state.js

create src\main\webapp\app\admin\health\health.controller.js

create src\main\webapp\app\admin\health\health.modal.controller.js

create src\main\webapp\app\admin\health\health.service.js

create src\main\webapp\app\admin\logs\logs.html

create src\main\webapp\app\admin\logs\logs.state.js

create src\main\webapp\app\admin\logs\logs.controller.js

create src\main\webapp\app\admin\logs\logs.service.js

create src\main\webapp\app\admin\metrics\metrics.html

create src\main\webapp\app\admin\metrics\metrics.modal.html

create src\main\webapp\app\admin\metrics\metrics.state.js

create src\main\webapp\app\admin\metrics\metrics.controller.js

create src\main\webapp\app\admin\metrics\metrics.modal.controller.js

create src\main\webapp\app\admin\metrics\metrics.service.js

create src\main\webapp\app\admin\user-management\user-management.html

create src\main\webapp\app\admin\user-management\user-management-detail.html

create src\main\webapp\app\admin\user-management\user-management-dialog.html

create src\main\webapp\app\admin\user-management\user-management-delete-dialog.html

create src\main\webapp\app\admin\user-management\user-management.state.js

create src\main\webapp\app\admin\user-management\user-management.controller.js

create src\main\webapp\app\admin\user-management\user-management-detail.controller.js

create src\main\webapp\app\admin\user-management\user-management-dialog.controller.js

create src\main\webapp\app\admin\user-management\user-management-delete-dialog.controller.js

create src\main\webapp\app\admin\gateway\gateway.html

create src\main\webapp\app\admin\gateway\gateway.state.js

create src\main\webapp\app\admin\gateway\gateway.controller.js

create src\main\webapp\app\admin\gateway\gateway.routes.service.js

create src\main\webapp\app\components\form\show-validation.directive.js

create src\main\webapp\app\components\form\maxbytes.directive.js

create src\main\webapp\app\components\form\minbytes.directive.js

create src\main\webapp\app\components\form\pagination.constants.js

create src\main\webapp\app\components\language\language.filter.js

create src\main\webapp\app\components\language\language.constants.js

create src\main\webapp\app\components\language\language.controller.js

create src\main\webapp\app\components\language\language.service.js

create src\main\webapp\app\components\login\login.html

create src\main\webapp\app\components\login\login.service.js

create src\main\webapp\app\components\login\login.controller.js

create src\main\webapp\app\components\util\base64.service.js

create src\main\webapp\app\components\util\capitalize.filter.js

create src\main\webapp\app\components\util\parse-links.service.js

create src\main\webapp\app\components\util\truncate-characters.filter.js

create src\main\webapp\app\components\util\truncate-words.filter.js

create src\main\webapp\app\components\util\date-util.service.js

create src\main\webapp\app\components\util\data-util.service.js

create src\main\webapp\app\components\util\pagination-util.service.js

create src\main\webapp\app\components\util\sort.directive.js

create src\main\webapp\app\components\util\sort-by.directive.js

create src\main\webapp\app\components\util\jhi-item-count.directive.js

create src\main\webapp\app\blocks\interceptor\auth.interceptor.js

create src\main\webapp\app\blocks\interceptor\auth-expired.interceptor.js

create src\main\webapp\app\blocks\interceptor\errorhandler.interceptor.js

create src\main\webapp\app\blocks\interceptor\notification.interceptor.js

create src\main\webapp\app\components\alert\alert.service.js

create src\main\webapp\app\components\alert\alert.directive.js

create src\main\webapp\app\components\alert\alert-error.directive.js

create src\main\webapp\app\entities\entity.state.js

create src\main\webapp\app\home\home.html

create src\main\webapp\app\home\home.state.js

create src\main\webapp\app\home\home.controller.js

create src\main\webapp\app\layouts\navbar\active-menu.directive.js

create src\main\webapp\app\layouts\navbar\navbar.html

create src\main\webapp\app\layouts\navbar\navbar.controller.js

create src\main\webapp\app\layouts\error\error.html

create src\main\webapp\app\layouts\error\accessdenied.html

create src\main\webapp\app\layouts\error\error.state.js

create src\main\webapp\app\services\auth\auth.service.js

create src\main\webapp\app\services\auth\principal.service.js

create src\main\webapp\app\services\auth\has-authority.directive.js

create src\main\webapp\app\services\auth\has-any-authority.directive.js

create src\main\webapp\app\services\auth\auth.jwt.service.js

create src\main\webapp\app\services\auth\account.service.js

create src\main\webapp\app\services\auth\activate.service.js

create src\main\webapp\app\services\auth\password.service.js

create src\main\webapp\app\services\auth\password-reset-init.service.js

create src\main\webapp\app\services\auth\password-reset-finish.service.js

create src\main\webapp\app\services\auth\register.service.js

create src\main\webapp\app\services\user\user.service.js

create src\main\webapp\app\services\profiles\profile.service.js

create src\main\webapp\app\services\profiles\page-ribbon.directive.js

create src\main\webapp\content\images\hipster.png

create src\main\webapp\content\images\hipster2x.png

create src\main\webapp\content\images\logo-jhipster.png

create src\test\javascript\karma.conf.js

create src\test\javascript\spec\helpers\module.js

create src\test\javascript\spec\helpers\httpBackend.js

create src\test\javascript\spec\app\admin\health\health.controller.spec.js

create src\test\javascript\spec\app\account\password\password.controller.spec.js

create src\test\javascript\spec\app\account\password\password-strength-bar.directive.spec.js

create src\test\javascript\spec\app\account\settings\settings.controller.spec.js

create src\test\javascript\spec\app\account\activate\activate.controller.spec.js

create src\test\javascript\spec\app\account\register\register.controller.spec.js

create src\test\javascript\spec\app\account\reset\finish\reset.finish.controller.spec.js

create src\test\javascript\spec\app\account\reset\request\reset.request.controller.spec.js

create src\test\javascript\spec\app\services\auth\auth.services.spec.js

create src\test\javascript\spec\app\components\login\login.controller.spec.js

create src\main\webapp\i18n\zh-cn\activate.json

create src\main\webapp\i18n\zh-cn\audits.json

create src\main\webapp\i18n\zh-cn\configuration.json

create src\main\webapp\i18n\zh-cn\error.json

create src\main\webapp\i18n\zh-cn\gateway.json

create src\main\webapp\i18n\zh-cn\login.json

create src\main\webapp\i18n\zh-cn\logs.json

create src\main\webapp\i18n\zh-cn\home.json

create src\main\webapp\i18n\zh-cn\metrics.json

create src\main\webapp\i18n\zh-cn\password.json

create src\main\webapp\i18n\zh-cn\register.json

create src\main\webapp\i18n\zh-cn\sessions.json

create src\main\webapp\i18n\zh-cn\settings.json

create src\main\webapp\i18n\zh-cn\reset.json

create src\main\webapp\i18n\zh-cn\user-management.json

create src\main\webapp\i18n\zh-cn\global.json

create src\main\webapp\i18n\zh-cn\health.json

create src\main\resources\i18n\messages_zh_cn.properties

I'm all done. Running npm install && bower install for you to install the required dependencies. If this fails, try running the command yourself.

同样需要修改配置并启动项目

Paste_Image.png

可以比对一下jHipster的非微服务的项目。

可以看出管理里面多了些菜单。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,271评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,275评论 2 380
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,151评论 0 336
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,550评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,553评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,559评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,924评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,580评论 0 257
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,826评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,578评论 2 320
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,661评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,363评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,940评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,926评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,156评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,872评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,391评论 2 342

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,580评论 18 139
  • 分班已经一周了… 这一周里我还是会经常回四班去。同学们都很好,每个人都热情地跟我们打招呼,包括一些之前不太熟悉的男...
    长安未安月空圆阅读 519评论 0 0
  • 英雄都具有高尚的品格,因此产生了各种高尚的行为。 高尚的情操能够改变我们庸俗的趣味,提升我们的修养,拓宽我们的心胸...
    彬彬888阅读 530评论 0 0
  • 关于负面评价,专家们是这样分析的: 负面的评价往往跟我们的自我评价——我们所擅长的、所胜任的——意见相左,这些负面...
    做自己的CEO阅读 225评论 0 1
  • 一直苦苦思索着你,我心中的精彩语文; 一直苦苦追求着你,我心中的精彩语文; 你给我...
    忆往昔注孤生阅读 317评论 0 0