Could not find org.springframework.cloud:spring-cloud-starter-netflix-ribbon - spring-cloud

I upgrade the spring cloud to 2020.0.3 right now, shows error Could not find org.springframework.cloud:spring-cloud-starter-netflix-ribbon when compile the project. Should I manage the component independent? why this component did not follow the spring cloud version?

Related

Spring cloud kubernetes all dependency

Converting a docker POC to a kubernetes project and based on Spring documentation (https://spring.io/projects/spring-cloud-kubernetes), I tried to add a spring-cloud-starter-kubernetes-all maven dependency and keep getting version not defined though I added spring-cloud dependency pom. Upon checking, found the "all" starter dependency is applicable for kubernetes client (spring-cloud-starter-kubernetes-client-all) and not to include entire spring cloud kubernetes starter dependencies (spring-cloud-starter-kubernetes-all). The spring cloud I am using is 2021.0.3. Am I missing anything or there are some other gap in the documentation?

Integrating Amazon SQS service into Eclipse

I am trying to integrate Amazon SQS into eclipse but I'm having a hard time and I have no clue how to do that. I have watched many you tube videos and they all are with intelliJ or with visual studio code.
I tried with visual studio code but by default location is changing in the credentials.
Can anyone let me know the dependencies to add and how to create a project so that I can integrate AWS and also how to run the final application and how to make changes in the queue created?
To use the AWS SDK for Java V2 in Eclipse, all you need to do is create a Maven Project in Eclipse. Then look at the AWS SDK Github repo here:
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/example_code/sqs
See this illustration.
Open the POM located here and copy and paste it into your Maven project's POM file. That will add the required dependencies into your project. Now you can add the examples to your project to get SQS examples working in Eclipse.
Of course, you need to setup your development environment - which includes setting up your AWS credentials. To learn how to do this, see this topic:
Get started with the AWS SDK for Java 2.x

Spring Integration Kafka not working

I am trying to explore Spring Integration using Kafka and Spring Boot. I am following this tutorial Spring Integration and Kafka
I am using the dependencies provided in that document,but i am getting the following exception
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'compression-codec' is not allowed to appear in element 'int-kafka:producer-configuration'.
I think this is a jar mismatch issue, but i am not able to resolve it, i tried to change the version a lot but the combination is not working for me. Please find my below gradle dependencies.
compile('org.springframework.boot:spring-boot-starter-integration')
compile('org.springframework.boot:spring-boot-starter')
compile('org.apache.kafka:kafka_2.10:0.8.1.1')
compile('org.springframework.integration:spring-integration-kafka:2.1.0.RELEASE')
compile('org.springframework.integration:spring-integration-java-dsl:1.1.0.M1')
Please do let me know if you need more details on this one.
That's a very old article based on the 1.x version; the configuration has changed considerably - see the updated Spring Integration Kafka documentation in the spring-kafka reference manual.
Spring Integration Kafka (2.x) is now based on the Spring Kafka project.
http://projects.spring.io/spring-kafka/
There is also a sample application but it uses Java configuration, not XML.
I have used the following dependencies and they worked.
compile('org.springframework.boot:spring-boot-starter')
compile('org.springframework.integration:spring-integration-stream')
compile('org.springframework.integration:spring-integration-kafka:2.1.0.RELEASE')
compile('org.springframework.integration:spring-integration-java-dsl:1.1.0.M1')

eclipse with new aws java web project, upgrade jar version

I'm not sure if I'm on the right track, but I can't find similar question on google or stackoverflow.
I'm using eclipse (luna), and I have this plugin from amazon, aws toolkit. When I create a project by clicking 'new aws web project', a new project will be created, and inside the aws sdk for java, some of the jar files have a version which is not I want, for example, spring-core-3.0.7.jar.
I tried convert this project to maven project and include dependency with latest spring-webmvc 4.x, but is seems two packages have conflict with each other. ref:
why .NoSuchMethodError: org.springframework.core.convert.converter.ConverterRegistry.addConverter
Two Maven Dependency for latest and old version conflicts
Spring MVC - Why the NoSuchMethodError exception when deploying context?
I tried to delete or upgrade the jar from aws sdk for java, but I can't find a way to delete it or upgrade it.
Then, I tried to create a normal java web project, convert to maven project and include the aws-java-sdk-core from maven repository, but after that I can't use the deploy to elastic beanstalk function.
Actually, I just want to create a project which let me use the latest spring framework, and also able to deploy to aws elastic beanstalk.
Follow steps:
create aws java web project
convert to maven project
delete aws java sdk package
add necessary jar using maven pom.xml
upload to aws elastic beanstalk
it works.

Spring installation with Eclipse

I have downloaded and installed Spring STS for Eclipse...
But when I've Created a Spring Project I can't to
import org.springframework.context.ApplicationContext;
So I tried to add library like spring.jar but I couldn't find this jar.(properties-->java build path-->libraries)
What's wrong with this setting? Or my installation is not ended?
Spring STS is only a Eclipse plugin which helps the developer managing spring beans. It is not mandatory for developing a spring-based application.
So your second approach was the right one to add the spring library. You can download spring here: Spring Downloads and then add it as a library to your project.
But serious... I would encourage you to do a tutorial first: http://www.springsource.org/tutorials
Plugins does not includes library of spring.
Plugin is only to manage the reference of configuration in your project build in eclipse.
Libraries are actual jar file which is required at compile as well as run time.
If you skip the plugin installation then your code will work if your configuration is correct
But if you skip spring library installation or download then your code will not compile of run.
Please go through step by step tutorial by following these tutorial
Spring Step By Step Tutorial