spring-boot-cities | Spring Boot Spring Data | Microservice library
kandi X-RAY | spring-boot-cities Summary
kandi X-RAY | spring-boot-cities Summary
This repository contains a sample project to demonstrate building and deploying a simple Spring Boot based microservice and a web app to consume the microservice. It was built in part to be used as part of a presentation on Spring Cloud Connectors.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of spring-boot-cities
spring-boot-cities Key Features
spring-boot-cities Examples and Code Snippets
Community Discussions
Trending Discussions on spring-boot-cities
QUESTION
I am trying to follow this tutorial https://github.com/cf-platform-eng/spring-boot-cities/tree/master/cities-service to run my spring boot application in Cloud Foundry. I have local bosh-lite installation
My Spring Boot application connects to postgresql as database. I am trying to connect to the Postgresql instance running on my local (host machine )
My application works fine locally if deployed to a local tomcat. But when i deploy the app to bosh-lite it fails with the following error "No unique service maching interface error ". My code is excatly the same as what is mentioned in the tutorial except i am using Maven to build my code.
...ANSWER
Answered 2017-Jun-07 at 18:50If you include spring-boot-starter-cloud-connectors
as a dependency, then Spring Cloud Connectors will attempt to create the java.sql.DataSource
bean necessary to connect to the database. Connectors does this by looking for a service binding that has certain characteristics. The No unique service matching interface javax.sql.DataSource found
message means that Connectors couldn't find a service binding of the appropriate type.
If you want to use Connectors as in that sample app then you will need to create a user-provided service instance with the details of the Postgres connection and bind that service instance to the app.
Alternatively, you could remove the spring-boot-starter-cloud-connectors
dependency and instead configure the database connection using spring.datasource
properties in application.yml
.
These options are explained in more detail in a blog post.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spring-boot-cities
You can use spring-boot-cities 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-boot-cities 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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page