providedRuntime `spring-boot-starter-undertow` in `build.gradle` but `:bootRun` still using Tomcat instead of undertowHow to configure port for a Spring Boot applicationSpring boot + gradle + tomcat hello world app not workingSpring Boot Tomcat Container Deployment ErrorsWhat are `spring-boot-starter` jars?How to deploy a spring boot MVC application in traditional tomcat webapps folder?how to run spring-boot integration tests with multiple embeded servers with gradleHow to create a build.gradle that builds three versions of a Spring Boot application - one with Tomcat, one with Jetty, one with Undertow embeddedHow do you deploy a spring boot application to an EAP server?Spring Boot fails to bootRunSpark integration with spring boot web starter

My bank got bought out, am I now going to have to start filing tax returns in a different state?

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

What is the best way to deal with NPC-NPC combat?

Creating a chemical industry from a medieval tech level without petroleum

Why do real positive eigenvalues result in an unstable system? What about eigenvalues between 0 and 1? or 1?

Unknown code in script

Is there a word for the censored part of a video?

Will I lose my paid in full property

A Paper Record is What I Hamper

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

As an international instructor, should I openly talk about my accent?

Drawing a german abacus as in the books of Adam Ries

Why did Rep. Omar conclude her criticism of US troops with the phrase "NotTodaySatan"?

Is there any pythonic way to find average of specific tuple elements in array?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

What is the term for a person whose job is to place products on shelves in stores?

Contradiction proof for inequality of P and NP?

Check if a string is entirely made of the same substring

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

How can I practically buy stocks?

How bug prioritization works in agile projects vs non agile

Why must Chinese maps be obfuscated?

Can someone publish a story that happened to you?

Apply a different color ramp to subset of categorized symbols in QGIS?



providedRuntime `spring-boot-starter-undertow` in `build.gradle` but `:bootRun` still using Tomcat instead of undertow


How to configure port for a Spring Boot applicationSpring boot + gradle + tomcat hello world app not workingSpring Boot Tomcat Container Deployment ErrorsWhat are `spring-boot-starter` jars?How to deploy a spring boot MVC application in traditional tomcat webapps folder?how to run spring-boot integration tests with multiple embeded servers with gradleHow to create a build.gradle that builds three versions of a Spring Boot application - one with Tomcat, one with Jetty, one with Undertow embeddedHow do you deploy a spring boot application to an EAP server?Spring Boot fails to bootRunSpark integration with spring boot web starter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have just initialised a new Spring Boot application and my build.gradle has the following dependencies:



dependencies 
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
testImplementation 'org.springframework.boot:spring-boot-starter-test'



When I run ./gradlew bootRun, it is using Tomcat. I understand starter-web includes Tomcat, but isn't providedRuntime there to override that?



How do I actually use undertow to run my Spring controllers?



EDIT:



I just realised my ServletInitializer.java looks like this:



import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
return application.sources(AccountServiceApplication.class);





This tells me it is initialising a servlet, which I assumed is undertow based on the dependencies, but was I wrong?










share|improve this question






























    0















    I have just initialised a new Spring Boot application and my build.gradle has the following dependencies:



    dependencies 
    implementation 'org.springframework.boot:spring-boot-starter-web'
    providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'



    When I run ./gradlew bootRun, it is using Tomcat. I understand starter-web includes Tomcat, but isn't providedRuntime there to override that?



    How do I actually use undertow to run my Spring controllers?



    EDIT:



    I just realised my ServletInitializer.java looks like this:



    import org.springframework.boot.builder.SpringApplicationBuilder;
    import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

    public class ServletInitializer extends SpringBootServletInitializer

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
    return application.sources(AccountServiceApplication.class);





    This tells me it is initialising a servlet, which I assumed is undertow based on the dependencies, but was I wrong?










    share|improve this question


























      0












      0








      0








      I have just initialised a new Spring Boot application and my build.gradle has the following dependencies:



      dependencies 
      implementation 'org.springframework.boot:spring-boot-starter-web'
      providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
      testImplementation 'org.springframework.boot:spring-boot-starter-test'



      When I run ./gradlew bootRun, it is using Tomcat. I understand starter-web includes Tomcat, but isn't providedRuntime there to override that?



      How do I actually use undertow to run my Spring controllers?



      EDIT:



      I just realised my ServletInitializer.java looks like this:



      import org.springframework.boot.builder.SpringApplicationBuilder;
      import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

      public class ServletInitializer extends SpringBootServletInitializer

      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
      return application.sources(AccountServiceApplication.class);





      This tells me it is initialising a servlet, which I assumed is undertow based on the dependencies, but was I wrong?










      share|improve this question
















      I have just initialised a new Spring Boot application and my build.gradle has the following dependencies:



      dependencies 
      implementation 'org.springframework.boot:spring-boot-starter-web'
      providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
      testImplementation 'org.springframework.boot:spring-boot-starter-test'



      When I run ./gradlew bootRun, it is using Tomcat. I understand starter-web includes Tomcat, but isn't providedRuntime there to override that?



      How do I actually use undertow to run my Spring controllers?



      EDIT:



      I just realised my ServletInitializer.java looks like this:



      import org.springframework.boot.builder.SpringApplicationBuilder;
      import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

      public class ServletInitializer extends SpringBootServletInitializer

      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
      return application.sources(AccountServiceApplication.class);





      This tells me it is initialising a servlet, which I assumed is undertow based on the dependencies, but was I wrong?







      java spring-boot gradle






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 7:38







      believesInSanta

















      asked Mar 9 at 7:10









      believesInSantabelievesInSanta

      2,12911729




      2,12911729






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You need to exclude tomcat from the build:



          dependencies 
          implementation ('org.springframework.boot:spring-boot-starter-web')
          exclude module: 'spring-boot-starter-tomcat'

          providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
          testImplementation 'org.springframework.boot:spring-boot-starter-test'






          share|improve this answer























          • I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

            – believesInSanta
            Mar 9 at 12:31











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074935%2fprovidedruntime-spring-boot-starter-undertow-in-build-gradle-but-bootrun%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You need to exclude tomcat from the build:



          dependencies 
          implementation ('org.springframework.boot:spring-boot-starter-web')
          exclude module: 'spring-boot-starter-tomcat'

          providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
          testImplementation 'org.springframework.boot:spring-boot-starter-test'






          share|improve this answer























          • I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

            – believesInSanta
            Mar 9 at 12:31















          0














          You need to exclude tomcat from the build:



          dependencies 
          implementation ('org.springframework.boot:spring-boot-starter-web')
          exclude module: 'spring-boot-starter-tomcat'

          providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
          testImplementation 'org.springframework.boot:spring-boot-starter-test'






          share|improve this answer























          • I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

            – believesInSanta
            Mar 9 at 12:31













          0












          0








          0







          You need to exclude tomcat from the build:



          dependencies 
          implementation ('org.springframework.boot:spring-boot-starter-web')
          exclude module: 'spring-boot-starter-tomcat'

          providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
          testImplementation 'org.springframework.boot:spring-boot-starter-test'






          share|improve this answer













          You need to exclude tomcat from the build:



          dependencies 
          implementation ('org.springframework.boot:spring-boot-starter-web')
          exclude module: 'spring-boot-starter-tomcat'

          providedRuntime 'org.springframework.boot:spring-boot-starter-undertow'
          testImplementation 'org.springframework.boot:spring-boot-starter-test'







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 9 at 12:24









          StrelokStrelok

          39.3k675100




          39.3k675100












          • I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

            – believesInSanta
            Mar 9 at 12:31

















          • I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

            – believesInSanta
            Mar 9 at 12:31
















          I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

          – believesInSanta
          Mar 9 at 12:31





          I tried that before, but actually had a typo in the excluded tomcat module name ... Works now, thanks!

          – believesInSanta
          Mar 9 at 12:31



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074935%2fprovidedruntime-spring-boot-starter-undertow-in-build-gradle-but-bootrun%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко