If you don’t want the embedded server to start, just set the following property in you application.properties
(or .yml
):
spring.main.web-application-type=none
If your classpath contains the necessary bits to start a web server, Spring Boot will automatically start it. To disable this behaviour configure the WebApplicationType in your application.properties
Source: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html
If you application really is a Web application, then you can easily change the port using the server.port
property (in your application’s .properties
/.yaml
file, as a command line argument at startup, etc).
Related Posts:
- Web server failed to start. Port 8080 was already in use. Spring Boot microserviceWeb server failed to start. Port 8080 was already in use. Spring Boot microservice
- Spring Boot – Unable to resolve Whitelabel Error Page
- Spring @PropertySources value not overriding
- Spring boot – Request method ‘POST’ not supported. Tried everything
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Gradle does not find tools.jar
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘demoRestController’
- Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio
- Could not find method compile() for arguments Gradle
- Consider defining a bean of type ‘package’ in your configuration [Spring-Boot]
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?
- Configure active profile in SpringBoot via Maven
- The request was rejected because no multipart boundary was found in springboot
- “Cannot start compilation: the output path is not specified for module…”
- java.lang.IllegalStateException: Failed to introspect Class
- Spring boot: Unable to start embedded Tomcat servlet container
- Spring Boot – Cannot determine embedded database driver class for database type NONE
- How can I convert a char to int in Java? [duplicate]
- “PKIX path building failed” and “unable to find valid certification path to requested target”
- How can I convert IPV6 address to IPV4 address?
- When do you use Java’s @Override annotation and why?
- Java Error “Exception in thread “main” java.util.InputMismatchException” On an Array program
- How to sort an ArrayList?
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- What is a classpath and how do I set it?
- Print ArrayList
- “Missing return statement” within if / for / while
- Understanding regex in Java: split(“\t”) vs split(“\\t”) – when do they both work, and when should they be used
- Make copy of an array
- How can I use ant
to execute commands on linux? - Invalid initial heap size -Xms4096M
- How do I use a PriorityQueue?
- What does Java option -Xmx stand for?
- Wait for page load in Selenium
- What does regular expression \\s*,\\s* do?
- Constructor cannot be applied to given types?
- Printing HashMap In Java
- Java “.class expected”
- Java Initialize an int array in a constructor
- How Exactly Does @param Work – Java
- Return string Input with parse.string
- Android ListView headers
- What does -XX:MaxPermSize do?
- What does .class mean in Java?
- PrintWriter append method not appending
- Java file outside of source root intelliJ
- Using ADB to capture the screen
- What is the difference between response.sendRedirect() and request.getRequestDispatcher().forward(request,response)
- Recursion vs. Iteration (Fibonacci sequence)
- What is difference between Errors and Exceptions?
- What is the difference between Integer and int in Java?
- Static Error: This class does not have a static void main method accepting String[]
- “uses unchecked or unsafe operations”
- possible lossy conversion from long to int?
- Java substring: ‘string index out of range’
- throw checked Exceptions from mocks with Mockito
- How to sort an array of objects in Java?
- Android – SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
- paint() and repaint() in Java
- Good Hash Function for Strings
- Error – Illegal static declaration in inner class
- Bubble Sort Manually a Linked List in Java
- Checking Password Code
- java – how to create and manipulate a bit array with length of 10 million bits
- What is the difference between object-oriented languages and non object-oriented languages?
- Exception in thread “main” java.lang.StringIndexOutOfBoundsException: String index out of range: 0
- Error: Main method not found in class Calculate, please define the main method as: public static void main(String[] args) [duplicate]
- ArrayList<> cannot be resolved to a type
- Simple way to repeat a string
- Unreachable statement compile error in Java
- Reflection generic get field value
- error: incompatible types: char cannot be converted to String – Java
- mongoDB, connection refused
- Displaying Image in Java
- How to check the input is an integer or not in Java?
- How to read and write XML files?
- wrong ELF class: ELFCLASS32
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- JAVA + try catch(FileNotFoundException e) going in catch(Exception e)?
- Using a do-while loop to check a User’s input in Java
- How to write a test class to test my code?
- How do I exit a while loop in Java?
- Java String import
- Printing array elements with a for loop
- How to implement a most-recently-used cache
- Cannot be resolved to a variable error in Eclipse
- Which Eclipse IDE version to choose?
- Error: The processing instruction target matching “[xX][mM][lL]” is not allowed
- Unable to resolve host “
” No address associated with host name - Why int[] a = new int[1] instead of just int a?
- getOutputStream() has already been called for this response
- Pass object by reference in Java
- What is object serialization?
- How do I use StringUtils in Java?
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- How to set menu to Toolbar in Android
- Is there a general string substitution function similar to sl4fj?