Which DI container is using on spring boot with embedded tomcat? - spring

a- Tomcat has it's own DI container for Servlets (which are beans).
b- Spring has it's own bean container (IoC).
When we start spring boot with embedded tomcat, then we have two application-context on runtime?
How can we print/list all application-contexts on a spring application?

I don't think CDI (Contexts and Dependency Injection) feature is provided by Tomcat (but it is in TomEE). There is only one context running, the Spring context.

Related

Is there a way I can integrate the spring boot application jar to another servlet application?

I have created a spring boot application with a few endpoints and want to make that endpoint to the existing servlet application without deploying it separately. So I want to create a jar from the spring boot app and use that jar in the servlet project. How can this be done? Any suggestion would be really helpful.

Migration of custom spring boot starter to quarkus

Do you know, how to use customized spring boot starter in quarkus. We have created a few spring boot starters for existing application. Now trying to migrate this app to quarkus. Beans defined in this spring boot starters are not scanned. I configured quakus.index- dependency.name but no luck

Is there any Spring Scope which equivalent to CDI view-access-scoped

My project already using CDI #ViewAccessScoped in class. Now am Migrating to Spring boot. It doesn't support #ViewAccessScoped in Spring boot. I need any equivalent scope available in spring boot.

Configuring Transaction Manager in spring boot embedded tomcat

I am using Spring boot 1.2.3 with embedded tomcat 8.0.20.
In regular tomcat we can configure transaction manager in context.
Example:
<Transaction factory="com.atomikos.icatch.jta.UserTransactionFactory"/>
Is there any way that I can register T/X manager in Spring boot embedded tomcat?
Check out http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-jta.html for how to enable atomicos transaction manager with spring boot.

how to use web.xml file into spring boot application without extend WsConfigurerAdapter?

I am using spring-boot to develop webservices, but I don't want to use WsConfigurerAdapter to define a WSDL and all, because I want to deploy my war into WAS7 and it does not support Servlet 3.0. So how would I add a web.xml configuration into my application.
Spring Boot doesn't support Servlet 2.5 out of the box, however you can use Spring Boot Legacy to get things working. Take a look at the Google App Engine sample application for an example of how to use Spring Boot Legacy and web.xml.
You may also be interested in this Spring Boot issue which is proposing to make Spring Boot Legacy an official part of Spring Boot.

Resources