Can we have sleuth with Otel for non spring boot applications?
Please share inputs.
No you can't. Spring Cloud Sleuth OTel requires Boot based applications.
Related
I want to start spring web flux project with spring security acl, But I couldn't find any tutorial. Is it possible to merge this two project together and use in single project?
spring ACL is included in spring security, so you don't need to pull it in separately.
Just because there are no tutorials, doesn't mean you can't use it. There is plenty of information about it in the official spring security documentation.
I am new to Spring MVC and i completed one crud operation using Spring MVC with JDBC template in Maven, now I am going to use of myBatis for same project.
But i don't know about myBatis , what is the advantage of using myBatis instead of JDBC and how it works with Spring MVC.
MyBatis has an official demo app called JPetStore which is based on Stripes.
There are several user contributed variants and this one is based on Spring MVC.
If you are using Spring Boot, check out this demo project which uses MyBatis Spring Boot Starter to make configuration easier.
Can I use the existing spring-boot-starter-web coding scheme with only spring-boot-starter-webflux added?? without spring-boot-starter-web.
spring-boot-starter-webflux provides the relevant dependencies for a Spring WebFlux application, from Jackson to the spring-webflux module for annotation and functional programming models.
spring-boot-starter-web does the same for Spring MVC.
Having both on the classpath means that you want a Spring MVC app and still use the new WebClient provided by Spring WebFlux in that application.
As mentioned in the Spring Boot reference documentation, you should add spring-boot-starter-webflux if you want to create a Spring WebFlux app and avoid adding spring-boot-starter-web.
I was trying to configure Spring WebFlux with JSP. I don't see any View class for supporting JSTL views in Spring WebFlux.
Does this mean that we can't develop a JSP application using Spring WebFlux?
Thanks, AJ
WebFlux is not tied to the Servlet specification so JSP support cannot be consistently implemented across deployment options.
As I understand - there is an opportunity to consume fewer of RAM and CPU.
As I know Servlet 3.1 already has been using NIO too. Are there any advantages in speed and/or loading?
This is a rather broad topic - but let's clear things up first.
Spring MVC is a web framework based on the Servlet API; such apps can be deployed on Servlet containers (like Jetty, Tomcat, Undertow).
Spring WebFlux is a reactive web framework based on a reactive HTTP layer; such apps can be deployed on Netty or Undertow (with native adapters) or Jetty/Tomcat/any Servlet 3.1 container (thanks to a Servlet 3.1 adapter).
Spring Boot applications can use Spring MVC or Spring WebFlux
Spring Framework 5.0 provides an FAQ about that with several useful resources. In short, this approach can be beneficial for efficiency and scalability for workloads dealing with lots of latency and concurrency.
Indeed, Servlet 3.1 async I/O does address those issues as well, but using that API requires to depart from using the other bits of the Servlet API which are blocking. This is why Spring WebFlux doesn't expose the Servlet API in its programming model but leverages a Servlet adapter.