Migrate from springframework cloud aws messaging to awspring cloud messaging version 2.4.1 - spring

After changing my imports to use the awspring library, I had #EnableSqs marked as deprecated, how to enable sqs if #EnableSqs is deprecated?

In Spring Cloud version 2.3 #EnableXYZ as deprecated being replaced by use of Auto-Configuration. See doc
Spring Cloud AWS 2.3 is now available.
#EnableXXX annotations have been deprecated. We recommend using Spring Boot auto-configurations.
How to use Auto-configuration?
Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, if HSQLDB is on your classpath, and you have not manually configured any database connection beans, then Spring Boot auto-configures an in-memory database.
You need to opt-in to auto-configuration by adding the #EnableAutoConfiguration or #SpringBootApplication annotations to one of your #Configuration classes.

Related

parentSpanId not propagated in spring boot 2.6.x and spring cloud 2021.0.4

I have upgraded my project to spring boot 2.6.11 and spring cloud 2021.0.4. After that, the parentId disappeared from the log.
I am using logback to logging purpose. So there is a way to display it?
I added a logging pattern but it didn't change anything:
logging.pattern.level=%5p [${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]

Spring Boot Confusion (using spring cloud dependency in spring boot framework)

I am new to spring framework. I have a confusion regarding spring boot and spring cloud.
I used https://start.spring.io/ to initialize a spring boot application. I think I am using the spring boot framework. However, I would like to use some spring cloud dependencies such as spring-cloud-stream-binder-kafka.
Question 1: If I added this dependency above to my spring boot application, I am wondering if I still can go with the spring boot framework, or I have to change to spring cloud framework.
Question 2: I am wondering if there is any difference when deploying the spring boot or spring cloud application. Or, they just have the different frameworks, and we could deploy them in the same way.
Thank you so much!
You can use together Spring Boot and Spring Cloud packages.
Spring Boot is just a preconfigured Spring Framework with some extra functionalities. It also uses library versions compatibile with each other. Spring Cloud is also the part of the Spring ecosystem, contains libraries that mostly used in cloud applications.
In the background, these packages will pull all necessary Spring (and other) libraries into your project, as transitive dependencies.
So you can use the generated pom/gradle, and add other dependencies. In this case Spring boot will be your core and cloud add extras.

How to Refresh Spring Boot Configuration Info with Using Spring Cloud Config

I would like to ask how to refresh spring boot configuration info with using spring cloud config. Would you please give me some advice? Many thanks.
If your spring boot application is a client of Spring Cloud Configuration Server and use itself as single point of truth in the application configuration let's say retrieve application.properties/yml from the config server, you can benefit of #RefreshScope. in this case if you do a post to the /refresh if you use spring boot 1.x or /actuator/refresh if you use spring boot 2.x all the bean that are have are annotated as #RefreshScope will be refreshed.

Spring WebMvcSecurityConfiguration is Deprecated

I started configuring security for a Spring boot application but WebMvcSecurityConfiguration is marked deprecated.
Is there a better alternative to configure security?
I'm using spring boot 1.5.4.
From official documentation
As of Spring Security 4.0, #EnableWebMvcSecurity is deprecated. The replacement is #EnableWebSecurity which will determine adding the Spring MVC features based upon the classpath.
https://docs.spring.io/spring-security/site/docs/current/reference/html/mvc.html

Liberty Spring Boot vs Spring Boot

What is the difference between Spring's Spring boot package and Liberty profile Spring Boot package(net.wasdev.wlp.starters.springbootweb)?
Did we get any advantage when we use net.wasdev.wlp.starters.springbootweb package with Liberty profile?
Why IBM specific Spring Boot package and what's its significance compare to conventional Spring Boot package?
net.wasdev.wlp.starters.springbootweb is essentially a sample application that demonstrates using spring boot w/ Liberty. It's not an alternative to spring boot.

Resources