spring-microservices | Microservices using Spring Boot , Spring Cloud | Microservice library

 by   in28minutes Java Version: Current License: MIT

kandi X-RAY | spring-microservices Summary

spring-microservices is a Java library typically used in Architecture, Microservice, Spring Boot, Spring, RabbitMQ applications. spring-microservices has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. However spring-microservices build file is not available. You can download it from GitHub.
Spring Microservices using Spring Cloud
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        spring-microservices has a medium active ecosystem.
                        summary
                        It has 1570 star(s) with 2598 fork(s). There are 201 watchers for this library.
                        summary
                        It had no major release in the last 6 months.
                        summary
                        There are 4 open issues and 13 have been closed. On average issues are closed in 445 days. There are 5 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of spring-microservices is current.
                        spring-microservices Support
                          Best in #Microservice
                            Average in #Microservice
                            spring-microservices Support
                              Best in #Microservice
                                Average in #Microservice

                                  kandi-Quality Quality

                                    summary
                                    spring-microservices has 0 bugs and 25 code smells.
                                    spring-microservices Quality
                                      Best in #Microservice
                                        Average in #Microservice
                                        spring-microservices Quality
                                          Best in #Microservice
                                            Average in #Microservice

                                              kandi-Security Security

                                                summary
                                                spring-microservices has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                spring-microservices code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                spring-microservices Security
                                                  Best in #Microservice
                                                    Average in #Microservice
                                                    spring-microservices Security
                                                      Best in #Microservice
                                                        Average in #Microservice

                                                          kandi-License License

                                                            summary
                                                            spring-microservices is licensed under the MIT License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            spring-microservices License
                                                              Best in #Microservice
                                                                Average in #Microservice
                                                                spring-microservices License
                                                                  Best in #Microservice
                                                                    Average in #Microservice

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        spring-microservices releases are not available. You will need to build from source code and install.
                                                                        summary
                                                                        spring-microservices has no build file. You will be need to create the build yourself to build the component from source.
                                                                        summary
                                                                        spring-microservices saves you 974 person hours of effort in developing the same functionality from scratch.
                                                                        summary
                                                                        It has 2216 lines of code, 161 functions and 63 files.
                                                                        summary
                                                                        It has low code complexity. Code complexity directly impacts maintainability of the code.
                                                                        spring-microservices Reuse
                                                                          Best in #Microservice
                                                                            Average in #Microservice
                                                                            spring-microservices Reuse
                                                                              Best in #Microservice
                                                                                Average in #Microservice
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi has reviewed spring-microservices and discovered the below as its top functions. This is intended to give you an instant insight into spring-microservices implemented functionality, and help decide if they suit your requirements.
                                                                                  • Deletes the user with the given id .
                                                                                    • Gets the details of a Course .
                                                                                      • Logs execution .
                                                                                        • Handle method argument not valid .
                                                                                          • Inserts a user .
                                                                                            • Provide default sampler
                                                                                              • Set the field2 .
                                                                                                • Gets the role .
                                                                                                  • Set the name .
                                                                                                    • Set the maximum allowed value .
                                                                                                      Get all kandi verified functions for this library.
                                                                                                      Get all kandi verified functions for this library.

                                                                                                      spring-microservices Key Features

                                                                                                      Microservices using Spring Boot, Spring Cloud, Docker and Kubernetes

                                                                                                      spring-microservices Examples and Code Snippets

                                                                                                      No Code Snippets are available at this moment for spring-microservices.
                                                                                                      Community Discussions

                                                                                                      Trending Discussions on spring-microservices

                                                                                                      Spring Boot Security PermitAll with RequestHeaderMatcher not working
                                                                                                      chevron right
                                                                                                      Service Discover using Spring cloud kubernetes
                                                                                                      chevron right
                                                                                                      Spring Cloud Config Server configuration with local repository
                                                                                                      chevron right
                                                                                                      Working With Eureka Clients Programmatically issue - Completed shut down of DiscoveryClient
                                                                                                      chevron right
                                                                                                      sh in docker image does not see executable on Windows 10
                                                                                                      chevron right
                                                                                                      spring cloud dataflow compatibilty with base cloud foundry versions
                                                                                                      chevron right

                                                                                                      QUESTION

                                                                                                      Spring Boot Security PermitAll with RequestHeaderMatcher not working
                                                                                                      Asked 2020-Jun-13 at 06:44

                                                                                                      After having followed a tutorial about microserves and OAuth2 in Maven Spring Boot, I got a problem. I want to exclude a request from the authentication, so unauthorized data can be gotten. This only doesn't seem to work in the way I do it. Can someone help me with this?

                                                                                                      Tutorial I followed: https://developer.okta.com/blog/2018/02/13/secure-spring-microservices-with-oauth#microservices-architectures-with-spring-boot--spring-cloud

                                                                                                      What I tried:

                                                                                                      @Configuration
                                                                                                      @EnableResourceServer
                                                                                                      public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                                                                                                      
                                                                                                          @Override
                                                                                                          public void configure(HttpSecurity http) throws Exception {
                                                                                                              http.requestMatcher(new RequestHeaderRequestMatcher("Authorization"))
                                                                                                                      .authorizeRequests()
                                                                                                                      .antMatchers("/**").authenticated()
                                                                                                                      .and()
                                                                                                                      .authorizeRequests()
                                                                                                                      .andMatchers(HttpMethod.GET, "/beers").permitAll();
                                                                                                          }
                                                                                                      }
                                                                                                      

                                                                                                      I have to authenticate when I try to do the request. How do I solve this?

                                                                                                      spring-security-oauth2-autoconfigure: 2.1.1.RELEASE

                                                                                                      ANSWER

                                                                                                      Answered 2020-Jun-13 at 06:44

                                                                                                      Firstly, your configuration is the same as the followings . Just removing those unnecessary duplicated authorizeRequests() and and() , which make it look more clearly :

                                                                                                        http.requestMatcher(new RequestHeaderRequestMatcher("Authorization"))
                                                                                                                      .authorizeRequests()
                                                                                                                      .antMatchers("/**").authenticated()
                                                                                                                      .andMatchers(HttpMethod.GET, "/beers").permitAll();
                                                                                                      

                                                                                                      It means spring security will only handle the requests if it has Authorization header. Otherwise ,the request will be ignored and no spring security stuff will apply to it.

                                                                                                      So if the request has the Authorization header , it will then start to check the rules (i.e. those matcher things configured by authorizeRequests()) from the top to the bottom according to the declaration order.Once a rule is matched , the bottom rule will be ignored and will not be checked.

                                                                                                      Since your first rule is to match every HTTP request ("/**") which makes all rules below it never execute and does not have any meaning.

                                                                                                      On the other hand , if you want spring security totally ignore "/beers" even its request has Authorization header , you should configure WebSecurity to ignore it :

                                                                                                       public void configure(WebSecurity web) throws Exception {
                                                                                                          web.ignoring()
                                                                                                             .antMatchers(HttpMethod.GET, "/beers");
                                                                                                      }
                                                                                                      

                                                                                                      Source https://stackoverflow.com/questions/62346184

                                                                                                      QUESTION

                                                                                                      Service Discover using Spring cloud kubernetes
                                                                                                      Asked 2019-Jul-17 at 10:08

                                                                                                      I am doing a POC on simple microservices architecture using typical Spring cloud stack but instead of Eureka server, service discovery is to be made using spring-cloud-kubernetes which is not working.

                                                                                                      The whole POC is here - https://github.com/dhananjay12/spring-microservices-using-spring-kubernetes

                                                                                                      Gateway as a edge server and 2 downstream services- user-service and contact-us-service.

                                                                                                      The k8 setup is in k8s folder.

                                                                                                      The downstream services have following dependencies:

                                                                                                      
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-kubernetes
                                                                                                              
                                                                                                              
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-netflix-eureka-client
                                                                                                              
                                                                                                      

                                                                                                      application.yml

                                                                                                      server:
                                                                                                        port: 8100
                                                                                                      
                                                                                                      management:
                                                                                                        endpoints:
                                                                                                          web:
                                                                                                            exposure:
                                                                                                              include: '*'
                                                                                                      
                                                                                                      
                                                                                                      spring:
                                                                                                        cloud:
                                                                                                          kubernetes:
                                                                                                            enabled: true
                                                                                                            reload:
                                                                                                              enabled: true
                                                                                                      eureka:
                                                                                                        client:
                                                                                                          enabled: false
                                                                                                      

                                                                                                      bootstrap.yml:

                                                                                                      spring:
                                                                                                        application:
                                                                                                          name: user-service
                                                                                                      

                                                                                                      and annotation of @EnableDiscoveryClient in the main class.

                                                                                                      The gateway service has too relevant kubernetes dependencies:

                                                                                                      
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-kubernetes
                                                                                                              
                                                                                                              
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-netflix-ribbon
                                                                                                              
                                                                                                              
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-kubernetes-ribbon
                                                                                                              
                                                                                                      

                                                                                                      application.yml

                                                                                                      server:
                                                                                                        port: 8050
                                                                                                      
                                                                                                      spring:
                                                                                                        application:
                                                                                                          name: gateway
                                                                                                        cloud:
                                                                                                          kubernetes:
                                                                                                            enabled: true
                                                                                                            reload:
                                                                                                              enabled: true
                                                                                                          gateway:
                                                                                                            discovery:
                                                                                                              locator:
                                                                                                                lowerCaseServiceId: true
                                                                                                                enabled: true
                                                                                                      
                                                                                                      eureka:
                                                                                                        client:
                                                                                                          enabled: false
                                                                                                      
                                                                                                      
                                                                                                      logging:
                                                                                                        level:
                                                                                                          root: DEBUG
                                                                                                          org.springframework.gateway: TRACE
                                                                                                          org.springframework.cloud.gateway: TRACE
                                                                                                          org.springframework.cloud.loadbalancer: TRACE
                                                                                                      
                                                                                                      
                                                                                                      management:
                                                                                                        endpoints:
                                                                                                          web:
                                                                                                            exposure:
                                                                                                              include: '*'
                                                                                                      
                                                                                                      
                                                                                                      

                                                                                                      bootstrap.yml

                                                                                                      spring:
                                                                                                        application:
                                                                                                          name: gateway
                                                                                                      

                                                                                                      and annotation of @EnableDiscoveryClient in the main class.

                                                                                                      Please see the deployment and service yaml here - https://github.com/dhananjay12/spring-microservices-using-spring-kubernetes/tree/master/k8s

                                                                                                      I am able to get to gateway but it is not routing to downstream service like user-service:

                                                                                                      For example - /user-service/users/getPublicMailingAddress

                                                                                                      gives Whitable error page

                                                                                                      and the logs in gateway shows:

                                                                                                      
                                                                                                      2019-07-07 06:40:30.017 TRACE 1 --- [or-http-epoll-2] o.s.c.g.h.p.RoutePredicateFactory : Pattern "[/my-nginx-nginx-ingress-controller/**]" does not match against value "/user-service/users/getPublicMailingAddress"
                                                                                                      

                                                                                                      ANSWER

                                                                                                      Answered 2019-Jul-17 at 10:08

                                                                                                      Spring Cloud Kubernetes requires access to the Kubernetes API in order to be able to retrieve a list of addresses for pods running for a single service. If you use Kubernetes, you should just execute the following command:

                                                                                                      kubectl create clusterrolebinding admin --clusterrole=cluster-admin --serviceaccount=default:default
                                                                                                      

                                                                                                      Source https://stackoverflow.com/questions/56919985

                                                                                                      QUESTION

                                                                                                      Spring Cloud Config Server configuration with local repository
                                                                                                      Asked 2019-Mar-12 at 22:46

                                                                                                      I'm trying to set up Spring Cloud Config Server with backend repository (filesystem), but the endpoint(http://localhost:8888/licensingservice/default) returns the following:

                                                                                                      {"name":"licensingservice","profiles":["default"],"label":null,"version":null,"state":null,"propertySources":[]}
                                                                                                      

                                                                                                      The Main:

                                                                                                      @EnableConfigServer
                                                                                                      @SpringBootApplication
                                                                                                      public class ConfigServerApplication {
                                                                                                      
                                                                                                          public static void main(String[] args) {
                                                                                                              SpringApplication.run(ConfigServerApplication.class, args);
                                                                                                          }
                                                                                                      }
                                                                                                      

                                                                                                      The application.yml:

                                                                                                      server:
                                                                                                         port: 8888
                                                                                                      spring:
                                                                                                         profiles:
                                                                                                            active: native
                                                                                                          cloud:
                                                                                                             config:
                                                                                                                server:
                                                                                                                   native:
                                                                                                                      searchLocations: file:///Users/josedavi/Desenvolvimento/WorkSpace/Pessoal/sample-spring-microservices/sample-spring-microservices/config-server/src/main/resources/config
                                                                                                      

                                                                                                      The licensingservice.yml:

                                                                                                      tracer.property: "I AM THE DEFAULT"
                                                                                                      spring.jpa.database: "POSTGRESQL"
                                                                                                      spring.datasource.platform: "postgres"
                                                                                                      spring.jpa.show-sql: "true"
                                                                                                      spring.database.driverClassName: "org.postgresql.Driver"
                                                                                                      spring.datasource.url: "jdbc:postgresql://database:5432/eagle_eye_local"
                                                                                                      spring.datasource.username: "postgres"
                                                                                                      spring.datasource.password: "p0stgr@s"
                                                                                                      spring.datasource.testWhileIdle: "true"
                                                                                                      spring.datasource.validationQuery: "SELECT 1"
                                                                                                      spring.jpa.properties.hibernate.dialect: "org.hibernate.dialect.PostgreSQLDialect"
                                                                                                      

                                                                                                      The path of the service config:

                                                                                                      C:\Users\josedavi\Desenvolvimento\WorkSpace\Pessoal\sample-spring-microservices\sample-spring-microservices\config-server\src\main\resources\config
                                                                                                      

                                                                                                      ANSWER

                                                                                                      Answered 2019-Feb-07 at 15:27

                                                                                                      Add the following format in your application.yml of config service:

                                                                                                      [classpath:/, classpath:/config, classpath:/config/{application}, classpath:/config/{application}/{profile}]

                                                                                                      The above format search locations from config folder, next folder with application name, application name and profile respectively.

                                                                                                      spring:
                                                                                                         profiles:
                                                                                                            active: native
                                                                                                         cloud:
                                                                                                             config:
                                                                                                                server:
                                                                                                                   native:
                                                                                                                      searchLocations: "[classpath:/, classpath:/config, classpath:/config/{application}, classpath:/config/{application}/{profile}]"
                                                                                                      

                                                                                                      Source https://stackoverflow.com/questions/54557032

                                                                                                      QUESTION

                                                                                                      Working With Eureka Clients Programmatically issue - Completed shut down of DiscoveryClient
                                                                                                      Asked 2018-Dec-31 at 05:48

                                                                                                      I've createde Eureka server with the replication and now trying to start the client. When I'm trying to start the spring-microservices-eureka-client, I get the below error. Using Spring Boot Version 2.1.1.RELEASE. The same error is coming with the Boot Version 2.0.7.RELEASE and Finchley.SR2.

                                                                                                      2018-12-28 13:52:16.741  INFO 20236 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
                                                                                                      2018-12-28 13:52:16.742  INFO 20236 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1545985336742, current=UP, previous=STARTING]
                                                                                                      2018-12-28 13:52:16.743  INFO 20236 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/841DTN2.corp.abc.org: registering service...
                                                                                                      2018-12-28 13:52:16.749  INFO 20236 --- [           main] ringMicroservicesEurekaClientApplication : Started SpringMicroservicesEurekaClientApplication in 3.335 seconds (JVM running for 4.12)
                                                                                                      2018-12-28 13:52:16.752  INFO 20236 --- [       Thread-6] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application UNKNOWN with eureka with status DOWN
                                                                                                      2018-12-28 13:52:16.752  WARN 20236 --- [       Thread-6] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1545985336752, current=DOWN, previous=UP]
                                                                                                      2018-12-28 13:52:16.756  INFO 20236 --- [       Thread-6] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
                                                                                                      2018-12-28 13:52:16.788  INFO 20236 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/841DTN2.corp.abc.org - registration status: 204
                                                                                                      2018-12-28 13:52:16.789  INFO 20236 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/841DTN2.corp.abc.org: registering service...
                                                                                                      2018-12-28 13:52:16.793  INFO 20236 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/841DTN2.corp.abc.org - registration status: 204
                                                                                                      2018-12-28 13:52:16.793  INFO 20236 --- [       Thread-6] com.netflix.discovery.DiscoveryClient    : Unregistering ...
                                                                                                      2018-12-28 13:52:16.799  INFO 20236 --- [       Thread-6] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_UNKNOWN/841DTN2.corp.abc.org - deregister  status: 200
                                                                                                      2018-12-28 13:52:16.805  INFO 20236 --- [       Thread-6] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient
                                                                                                      

                                                                                                      spring-microservices-eureka-server application.yml

                                                                                                      ---
                                                                                                      spring:
                                                                                                        profiles: peer1
                                                                                                      server:
                                                                                                        port: 8761
                                                                                                      eureka:
                                                                                                        instance:
                                                                                                          hostname: peer1
                                                                                                        client:
                                                                                                          service-url:
                                                                                                            defaultZone: http://peer2:8762/eureka
                                                                                                          register-with-eureka: false
                                                                                                          fetch-registry: false
                                                                                                      
                                                                                                      ---
                                                                                                      spring:
                                                                                                        profiles: peer2
                                                                                                      server:
                                                                                                        port: 8762
                                                                                                      eureka:
                                                                                                        instance:
                                                                                                          hostname: peer2
                                                                                                        client:
                                                                                                          service-url:
                                                                                                            defaultZone: http://peer1:8761/eureka
                                                                                                          register-with-eureka: false
                                                                                                          fetch-registry: false
                                                                                                      

                                                                                                      SpringMicroservicesEurekaServerApplication.java

                                                                                                      @EnableEurekaServer
                                                                                                      @SpringBootApplication
                                                                                                      public class SpringMicroservicesEurekaServerApplication {
                                                                                                          public static void main(String[] args) {
                                                                                                              SpringApplication.run(SpringMicroservicesEurekaServerApplication.class, args);
                                                                                                          }
                                                                                                      }
                                                                                                      

                                                                                                      pom.mxl

                                                                                                      
                                                                                                          4.0.0
                                                                                                          
                                                                                                              org.springframework.boot
                                                                                                              spring-boot-starter-parent
                                                                                                              2.1.1.RELEASE
                                                                                                               
                                                                                                          
                                                                                                          com.oreilly.cloud
                                                                                                          spring-microservices-eureka-server
                                                                                                          0.0.1-SNAPSHOT
                                                                                                          spring-microservices-eureka-server
                                                                                                          Demo project for Spring Boot
                                                                                                      
                                                                                                          
                                                                                                              1.8
                                                                                                              Greenwich.RC2
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-netflix-eureka-server
                                                                                                              
                                                                                                      
                                                                                                              
                                                                                                                  org.springframework.boot
                                                                                                                  spring-boot-starter-test
                                                                                                                  test
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  
                                                                                                                      org.springframework.cloud
                                                                                                                      spring-cloud-dependencies
                                                                                                                      ${spring-cloud.version}
                                                                                                                      pom
                                                                                                                      import
                                                                                                                  
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  
                                                                                                                      org.springframework.boot
                                                                                                                      spring-boot-maven-plugin
                                                                                                                  
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  spring-milestones
                                                                                                                  Spring Milestones
                                                                                                                  https://repo.spring.io/milestone
                                                                                                              
                                                                                                          
                                                                                                      

                                                                                                      spring-microservices-eureka-client

                                                                                                      SpringMicroservicesEurekaClientApplication.java

                                                                                                      @SpringBootApplication
                                                                                                      @EnableEurekaClient
                                                                                                      public class SpringMicroservicesEurekaClientApplication {
                                                                                                      
                                                                                                          public static void main(String[] args) {
                                                                                                              SpringApplication.run(SpringMicroservicesEurekaClientApplication.class, args);
                                                                                                          }
                                                                                                      }
                                                                                                      

                                                                                                      Reference issue: https://github.com/spring-cloud/spring-cloud-netflix/issues/2099 - This look major issue to me.

                                                                                                      pom.xml

                                                                                                      
                                                                                                          4.0.0
                                                                                                          
                                                                                                              org.springframework.boot
                                                                                                              spring-boot-starter-parent
                                                                                                              2.1.1.RELEASE
                                                                                                               
                                                                                                          
                                                                                                          com.oreilly.cloud
                                                                                                          spring-microservices-eureka-client
                                                                                                          0.0.1-SNAPSHOT
                                                                                                          spring-microservices-eureka-client
                                                                                                          Demo project for Spring Boot
                                                                                                      
                                                                                                          
                                                                                                              1.8
                                                                                                              Greenwich.RC2
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  org.springframework.cloud
                                                                                                                  spring-cloud-starter-netflix-eureka-client
                                                                                                              
                                                                                                      
                                                                                                              
                                                                                                                  org.springframework.boot
                                                                                                                  spring-boot-starter-test
                                                                                                                  test
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  
                                                                                                                      org.springframework.cloud
                                                                                                                      spring-cloud-dependencies
                                                                                                                      ${spring-cloud.version}
                                                                                                                      pom
                                                                                                                      import
                                                                                                                  
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  
                                                                                                                      org.springframework.boot
                                                                                                                      spring-boot-maven-plugin
                                                                                                                  
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                          
                                                                                                              
                                                                                                                  spring-milestones
                                                                                                                  Spring Milestones
                                                                                                                  https://repo.spring.io/milestone
                                                                                                              
                                                                                                          
                                                                                                      
                                                                                                      

                                                                                                      ANSWER

                                                                                                      Answered 2018-Dec-31 at 05:48

                                                                                                      I was able to solve this issue by adding the web dependency

                                                                                                      
                                                                                                          org.springframework.boot
                                                                                                          spring-boot-starter-web
                                                                                                      
                                                                                                      

                                                                                                      Source https://stackoverflow.com/questions/53955613

                                                                                                      QUESTION

                                                                                                      sh in docker image does not see executable on Windows 10
                                                                                                      Asked 2017-Dec-03 at 10:07

                                                                                                      I have a docker image https://github.com/carnellj/spmia-chapter1 which does not find its CMD ./run.sh executable although it is there in the file system.

                                                                                                      I was able to run /bin/sh in the container, and I can ls -l:

                                                                                                      D:\Dokumente\ws\spring-microservices\spmia-chapter1 (master)
                                                                                                      λ docker run -i -t johncarnell/tmx-simple-service:chapter1 /bin/sh
                                                                                                      / # ls -l
                                                                                                      total 56
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 bin
                                                                                                      drwxr-xr-x    5 root     root           360 Apr 22 07:10 dev
                                                                                                      drwxr-xr-x    1 root     root          4096 Apr 22 07:10 etc
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 home
                                                                                                      drwxr-xr-x    1 root     root          4096 Apr 22 06:01 lib
                                                                                                      drwxr-xr-x    5 root     root          4096 Mar  3 11:20 media
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 mnt
                                                                                                      dr-xr-xr-x  123 root     root             0 Apr 22 07:10 proc
                                                                                                      drwx------    1 root     root          4096 Apr 22 07:10 root
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 run
                                                                                                      -rwxr-xr-x    1 root     root           245 Apr 22 06:50 run.sh
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 sbin
                                                                                                      drwxr-xr-x    2 root     root          4096 Mar  3 11:20 srv
                                                                                                      dr-xr-xr-x   13 root     root             0 Apr 22 07:10 sys
                                                                                                      drwxrwxrwt    2 root     root          4096 Mar  3 11:20 tmp
                                                                                                      drwxr-xr-x    1 root     root          4096 Mar  7 01:04 usr
                                                                                                      drwxr-xr-x    1 root     root          4096 Mar  7 01:04 var
                                                                                                      / # ./run.sh
                                                                                                      /bin/sh: ./run.sh: not found
                                                                                                      / # ls run.sh
                                                                                                      run.sh
                                                                                                      

                                                                                                      /bin/sh does not find ./run.sh although it is there in the file system, as proven by ls run.sh. Also, cat shows the content of run.sh:

                                                                                                      / # cat run.sh                                                       
                                                                                                      #!/bin/sh                                                            
                                                                                                      echo "********************************************************"      
                                                                                                      echo "Starting simple-service "                                      
                                                                                                      echo "********************************************************"      
                                                                                                      java -jar /usr/local/simple-service/simple-service-0.0.1-SNAPSHOT.jar
                                                                                                      

                                                                                                      When I run vi from sh and copy the content of run.sh into a new file myrun.sh and make myrun.sh executable, I can execute ./myrun.sh and the spring service starts.

                                                                                                      What is going on here? Why would sh not see an executable which is there in the filesystem? Executables from PATH or executables which I add manually run fine.

                                                                                                      I am running Docker on Windows 10.

                                                                                                      ANSWER

                                                                                                      Answered 2017-Apr-22 at 08:34

                                                                                                      OK the reason is, run.sh is created with Windows line endings in the docker image if you check out with automatic lf->crlf conversion. One possible solution is to tell git not to convert line endings.

                                                                                                      Source https://stackoverflow.com/questions/43556722

                                                                                                      QUESTION

                                                                                                      spring cloud dataflow compatibilty with base cloud foundry versions
                                                                                                      Asked 2017-Mar-01 at 18:34

                                                                                                      I am reading this release announcement for Spring Cloud dataflow. https://spring.io/blog/2017/02/22/spring-cloud-data-flow-for-cloud-foundry-1-1-1-maintenance-release-available

                                                                                                      I am wondering if we need a minimum version of cloud foundry for successfully running spring cloud data applications.. Given that this stream of work is actually targeted for cloud based environments, i think they should also mention the minimum base Cloud Foundry versions that can support them.

                                                                                                      Does this require an inter-process communication that's being made available in latest cloud foundry versions https://www.cloudfoundry.org/meet-new-container-networking-stack-cloud-foundry/ https://content.pivotal.io/blog/building-spring-microservices-with-cloud-foundrys-new-container-networking-stack

                                                                                                      I do see the mention of PCF version compatibility for Spring Cloud Tasks http://docs.spring.io/spring-cloud-dataflow-server-cloudfoundry/docs/current-SNAPSHOT/reference/htmlsingle/#_version_compatibility

                                                                                                      But i haven't been able to find the Base cloud foundry version that supports the features of Spring Cloud Data Flow in general or per feature compatibility breakdown with Cloud foundry versions. We are running IBM Bluemix in our company and are upgrading to the cf version that supports Deigo architecture (vs the current DEA) - don't know the exact version of CF will that be.

                                                                                                      If we know the Spring Cloud Data flow feature compatibility with specific Cloud Foundry versions we can decide our adoption strategy accordingly.

                                                                                                      ANSWER

                                                                                                      Answered 2017-Mar-01 at 18:34

                                                                                                      Please refer to PCF vs. OSS CF compatibility matrix from the project site.

                                                                                                      This matrix captures the baseline OSS CF release required to run SCDF on the particular PCF versions. You could further dive into respective PCF release-notes to double check other OSS components (eg., CAPI) for more granular compatibility measurements.

                                                                                                      Tasks in SCDF, in particular, is GA'd with PCF 1.9; so if you're planning to use it, you'd have to be at least on OSS CF 246 release.

                                                                                                      Source https://stackoverflow.com/questions/42445568

                                                                                                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                                      Vulnerabilities

                                                                                                      No vulnerabilities reported

                                                                                                      Install spring-microservices

                                                                                                      You can download it from GitHub.
                                                                                                      You can use spring-microservices like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the spring-microservices component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                                                                                                      Support

                                                                                                      Refer our TroubleShooting Guide - https://github.com/in28minutes/in28minutes-initiatives/tree/master/The-in28Minutes-TroubleshootingGuide-And-FAQ
                                                                                                      Find more information at:
                                                                                                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                      Find more libraries
                                                                                                      Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                      Save this library and start creating your kit
                                                                                                      CLONE
                                                                                                    • HTTPS

                                                                                                      https://github.com/in28minutes/spring-microservices.git

                                                                                                    • CLI

                                                                                                      gh repo clone in28minutes/spring-microservices

                                                                                                    • sshUrl

                                                                                                      git@github.com:in28minutes/spring-microservices.git

                                                                                                    • Share this Page

                                                                                                      share link

                                                                                                      Reuse Pre-built Kits with spring-microservices

                                                                                                      Consider Popular Microservice Libraries

                                                                                                      mall

                                                                                                      by macrozheng

                                                                                                      istio

                                                                                                      by istio

                                                                                                      apollo

                                                                                                      by apolloconfig

                                                                                                      Try Top Libraries by in28minutes

                                                                                                      devops-master-class

                                                                                                      by in28minutesJava

                                                                                                      spring-boot-examples

                                                                                                      by in28minutesJava

                                                                                                      spring-master-class

                                                                                                      by in28minutesJava

                                                                                                      java-a-course-for-beginners

                                                                                                      by in28minutesJavaScript

                                                                                                      SpringMvcStepByStep

                                                                                                      by in28minutesJava

                                                                                                      Compare Microservice Libraries with Highest Support

                                                                                                      apollo

                                                                                                      by ctripcorp

                                                                                                      istio

                                                                                                      by istio

                                                                                                      open-liberty

                                                                                                      by OpenLiberty

                                                                                                      envoy

                                                                                                      by envoyproxy

                                                                                                      seata

                                                                                                      by seata

                                                                                                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                      Find more libraries
                                                                                                      Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                      Save this library and start creating your kit