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

Why do distances seem to matter in the Foundation world?

How can I practically buy stocks?

How do I produce this symbol: Ϟ in pdfLaTeX?

Unknown code in script

What is this word supposed to be?

What was Apollo 13's "Little Jolt" after MECO?

How bug prioritization works in agile projects vs non agile

Is Diceware more secure than a long passphrase?

Prove that the countable union of countable sets is also countable

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?

A ​Note ​on ​N!

What is purpose of DB Browser(dbbrowser.aspx) under admin tool?

Nails holding drywall

What's the difference between using dependency injection with a container and using a service locator?

Can I criticise the more senior developers around me for not writing clean code?

Is it acceptable to use working hours to read general interest books?

How to have a sharp product image?

Complex numbers z=-3-4i polar form

Does a large simulator bay have standard public address announcements?

Why did C use the -> operator instead of reusing the . operator?

Find the identical rows in a matrix

Philosophical question on logistic regression: why isn't the optimal threshold value trained?

How long after the last departure shall the airport stay open for an emergency return?

Multiple fireplaces in an apartment building?



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

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

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