the simplest cloud
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle/wrapper
simple-boot
simple-consumer
simple-eureka
simple-provider
.gitignore
.travis.yml
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

spring-cloud-simple

Finchley Build Status
https://github.com/spring-cloud-samples

Test

  1. 依次启动eureka,provider,consumer
  2. 直接访问 localhost:8763/hi?name=hongxi

Upgrade

Spring Cloud Finchley.RELEASE 基于Spring Boot 2.x,相比Edgware等之前的版本有重大改动,很多依赖的artifactId有重新命名, Spring Cloud Gateway 代替了zuul,一些注解名、属性名也有变动,升级过程可谓十分蛋疼。

Gradle

  • A build tool better then maven, faster and more flexible.
  • Please use the latest IntelliJ IDEA (2017.3.2)
  • Build: ./gradlew clean build -x test
  • Build one module: ./gradlew :simple-eureka:build
  • Run Spring Boot Application: ./gradlew :simple-eureka:bootRun
  • Gradle used in big project
  • More ...

Install Gradle

$ mkdir /opt/gradle
$ unzip -d /opt/gradle gradle-4.1-bin.zip
$ ls /opt/gradle/gradle-4.1
LICENSE NOTICE bin getting-started.html init.d lib media
$ export PATH=$PATH:/opt/gradle/gradle-4.1/bin
$ gradle -v

Upgrade with the Gradle Wrapper

$ ./gradlew wrapper --gradle-version=4.1 --distribution-type=bin

Building Java Applications

$ mkdir java-demo
$ cd java-demo
$ gradle init --type java-application
$ ./gradlew build -x test
$ ./gradlew run
$ ./gradlew tasks

Maven转Gradle

$ gradle init wrapper

© hongxi.org