GithubHelp home page GithubHelp logo

microsoft / spring-cloud-playground Goto Github PK

View Code? Open in Web Editor NEW
20.0 7.0 11.0 19.78 MB

Azure Spring Cloud Playground helps you scaffold and generate Microservice projects

License: MIT License

Java 79.56% CSS 1.17% Shell 0.97% JavaScript 8.54% Batchfile 0.08% HTML 9.55% Dockerfile 0.14%

spring-cloud-playground's Introduction

Azure Spring Cloud Playground

Azure Spring Cloud Playground helps you scaffold and generate Microservice projects. It provides you with native Spring Cloud modules as well as modules developed for connecting to and consuming Azure related services. The generated Microservice projects follow The Twelve-Factor App methodology and are ready for further development with Azure Dev Spaces and Azure Kubernetes Service.

Getting Started

  • Install Maven and Docker
  • Access to azure-spring-cloud.azurewebsites.net
  • Sign in with your Azure subscription if you want your Spring Cloud Azure modules to be configured. If you don't have a Azure subscription get a free one.
  • Select the modules you'd like to start with and generate the project.
  • You can run locally with docker compose. Extract and go to project root directory, run the following:
cd docker
run.cmd (run.sh)

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

spring-cloud-playground's People

Contributors

incarnation-p-lee avatar matthew-dong avatar miaosakurai avatar microsoftopensource avatar msftgits avatar sophiaso avatar yaweiw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-cloud-playground's Issues

Gateway cannot access generated services from gateway portal

Caused by generated cloud-gateway.yml has wrong route url for service.

Generated:

      routes:
      - id: AzureServiceBusApplication
        uri: lb://AzureServiceBusApplication
        predicates:
        - Path=/AzureServiceBusApplication/**

Expected:

      routes:
      - id: AzureServiceBusApplication
        uri: lb://azure-service-bus
        predicates:
        - Path=/azure-service-bus/**

Change the name of Spring Cloud/Boot Azure Starters

  • Azure Event Hub // Spring Cloud Stream Binder for Azure Event Hub
  • Azure Storage // Spring Resource with Azure Storage
  • Azure Cosmos DB // Spring Data Azure Cosmos DB (SQL API)
  • Azure Redis Cache // Spring Caching with Azure Redis Cache
  • Azure Active Directory // Spring Security with Azure Active Directory
  • Azure Key Vault // Spring Boot with Azure Key Vault

404 error when accessing http://localhost:8080/storage

Remove value = "/". The path in @RequestMapping on the method is relative to the path on the class annotation.

@RequestMapping(value = "/", method = RequestMethod.GET)
public String readBlobFile() throws IOException {
    return StreamUtils.copyToString(
            this.blobFile.getInputStream(),
            Charset.defaultCharset()) + "\n";
}

https://github.com/Microsoft/spring-cloud-playground/blob/72e33e68329c1f767a341f5a172b003951ae404f/src/main/resources/templates/azure-storage/StorageController.java#L23

spring data jpa doesn't work

  1. jpa dependency needs to be added manually - against the description of sql module
  2. data not written into the db.

azure storage and sql in one microservice result in bean dependency cycle

The dependencies of some of the beans in the application context form a cycle:

   servletEndpointRegistrar defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]
      ↓
   healthEndpoint defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]
      ↓
   org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration
┌─────┐
|  dataSource
↑     ↓
|  scopedTarget.dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
↑     ↓
|  org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker

eliminate unnecessary http request to spring.io

the boot data rarely changes, we can make it constant for now.

Fetching boot metadata from https://spring.io/project_metadata/spring-boot
Fetching boot metadata from https://spring.io/project_metadata/spring-boot
Fetching boot metadata from https://spring.io/project_metadata/spring-boot

separate navigation header to another template

As header will be shown for every page, in order to reuse the navigation header, separate header to a standalone template. Expected sample result:

Homepage:

<html>
   <head>omitted</head>
   <body>
          {{> header}}
          {{> home}}
   </body>
</html>

Deploy page:

<html>
   <head>omitted</head>
   <body>
          {{> header}}
          {{> deploy}}
   </body>
</html>

change `modules` to `module(s)`

if users just select one module, playground still says modules rather module. Suggest change wording to module(s).

e.g.
cloud-config-server, modules: cloud-config-server, port: 8888

Use Post http request to backend

Project request should sent POST request with Json body to backend.

Content-Type: application/json

{
	"name":"demo",
	"type":"maven-project",
	"groupId":"com.example",
	"artifactId":"demo",
	"version": "0.0.1-SNAPSHOT",
	"bootVersion":"2.0.3.RELEASE",
	"language":"java",
	"packageName":"com.example.demo",
	"javaVersion":"1.8",
	"baseDir":"demo",
	"packaging": "pom",
	"description": "Project for spring cloud on azure",
	"microServices":[
		{
			"name":"cloud-config-server",
			"modules": ["cloud-config-server"],
			"port": 8888
		},
		{
			"name":"cloud-eureka-server",
			"modules": ["cloud-eureka-server"],
			"port": 8761
		},
		{
			"name":"cloud-gateway",
			"modules": ["cloud-gateway"],
			"port": 9999
		},
		{
			"name":"azure-service-bus",
			"modules": ["azure-service-bus"],
			"port": 8081
		},
		{
			"name":"cloud-hystrix-dashboard",
			"modules": ["cloud-hystrix-dashboard"],
			"port": 7979
		}
	]
}

Reset to default configuration is confusing

The reset to default configuration link is confusing, from the link description, sounds like port will be reset to default value, but actually it's hide port configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.