spring-guides / getting-started-guides

Getting Started Guide template :: The template for new guides and also the place to request them.
https://github.com/spring-guides/getting-started-guides/wiki
Apache License 2.0
521 stars 204 forks source link

GSG for Spring Cloud Netflix Zuul #22

Closed fifthposition closed 8 years ago

fifthposition commented 8 years ago

Shows how to use Netflix Zuul for routing and filtering.

dsyer commented 8 years ago

This looks awesome. The only issue I foresee is that STS (and maybe other tools) make assumptions about the structure of the project. I think there are other guides that do not simply have a single maven/gradle project under /complete, so this one might not be a complete outlier.

In any case the top level of the complete project looks like it is trying to build a jar which must be wrong (it should be a pom with a reactor build for the subprojects).

gregturn commented 8 years ago

@fifthposition If you throw out the top level build.gradle, and adjust the top level pom.xml to look like this => https://github.com/spring-guides/gs-service-registration-and-discovery/blob/master/complete/pom.xml, it should work.

See https://github.com/spring-guides/gs-service-registration-and-discovery/tree/master/complete as your template for a multi-module guide.

gregturn commented 8 years ago

To further test things, run test/run.sh on the root of the project. We do that for all Travis CI jobs. It will give you hints if anything is out of alignment.

fifthposition commented 8 years ago

@dsyer @gregturn Thank you! The POM now builds the subprojects and the complete/build.gradle is gone. (And thanks for pointing out test/run.sh!).

dsyer commented 8 years ago

We need a build.gradle as well don't we?

gregturn commented 8 years ago

@dsyer Apparently not. See the registry guide. It works fine as is.

dsyer commented 8 years ago

But if anyone wants to use this as a project template and they want to use gradle, won't they expect it? I guess we can skip it for now if there's a precedent.

gregturn commented 8 years ago

@dsyer gradle works. test/run.sh verifies it.

gregturn commented 8 years ago

It has settings.gradle which tells it what to do.

gregturn commented 8 years ago

Successfully merged into https://github.com/spring-guides/gs-routing-and-filtering