I know that if we want to deploy spring boot web app on external server we should exclude the embedded server,but what happens if we dont? Lets say Im deploying spring boot war on jboss external server,but I did not exclude tomcat server?In that case, Does spring boot uses jboss external server, or still uses embedded tomcat one?
In dual packaging scenario, ideally you should specify tomcat dependencies as provided so that you will have tomcat dependencies under WEB-INF/lib-provided rather than WEB-INF/lib. Therefore with an external server lib-provided folder will be ignored bu with a standalone spring boot application tomcat dependencies will be loaded as embedded from lib-provided folder.
Note that If you do not exclude or make provided the tomcat dependencies, external server might fail or work in inconsistence state or even can work without error in some version while failing in another version version depending on the server handling of duplicate libraries.