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 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
- Problem with gif with transparent background
- Search for words with telephone numbers from 2-3-4 tree
- Java 8 Iterable.forEach() vs foreach loop
- How to round a number to n decimal places in Java
- Error unable to access jarfile C:\Jar
- In laymans terms, what does ‘static’ mean in Java? [duplicate]
- Creating a “logical exclusive or” operator in Java
- Cannot make a static reference to the non-static method fxn(int) from the type Two [duplicate]
- How can I use pointers in Java?
- JavaFX – Exception in Application start method?
- Is there a stopwatch in Java?
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- When is the @JsonProperty property used and what is it used for?
- Why is there no SortedList in Java?
- How to convert any Object to String?
- How do I copy an object in Java?
- Unfortunately MyApp has stopped. How can I solve this?
- What is the significance of load factor in HashMap?
- Which HTML Parser is the best?
- Returning Arrays in Java
- Constructor cannot be applied to given types?
- Mocking static methods with Mockito
- Finding the max/min value in an array of primitives using Java
- How to for each the hashmap?
- Why do I get SQLCODE=-204, SQLSTATE=42704 with DB2 LUW and WebSphere App Server?
- java.net.UnknownHostException: Invalid hostname for server: local
- HashMap get/put complexity
- @Autowired – No qualifying bean of type found for dependency
- SSH library for Java
- com.sun.jdi.InvocationException occurred invoking method
- How can I check whether an array is null / empty?
- How to solve javax.net.ssl.SSLHandshakeException Error?
- What causes java.lang.IncompatibleClassChangeError?
- Add an object to an Array of a custom class
- What does java.lang.Thread.interrupt() do?
- java string cannot be converted to boolean error
- Double decimal formatting in Java
- Converting JSON to XML in Java
- This Activity already has an action bar supplied by the window decor?
- Convert hex string to int
- Orphaned Case Error in Java
- Proxy Error 502 : The proxy server received an invalid response from an upstream server
- Java double.MAX_VALUE?
- how to do a system pause in java for debugging?
- Immutable class?
- Is spring default scope singleton or not?
- Java Reflection – Object is not an instance of declaring class
- What does “AL lib: alc_cleanup: 1 device not closed” mean?
- Incompatible types List of List and ArrayList of ArrayList
- Dice Rolling java program
- int cannot be converted to int []
- Joda DateTime to Timestamp conversion
- break statement in “if else” – java
- What is the difference between JSF, Servlet and JSP?
- Get only part of an Array in Java?
- How to Get JSON Array Within JSON Object?
- What is a class constant?
- How to represent a fix number of repeats in regular expression?
- How to import a jar in Eclipse
- Getting “unixtime” in Java
- How do I break out of nested loops in Java?
- How do I convert this for loop into a while loop?
- Java switch statement: Constant expression required, but it IS constant
- Resolving File paths – ‘File not found’ error in Eclipse
- Simple Coin Toss using random class in Java. The do while loop doesn’t seem to generate random results
- Why I am getting DefaultHttpClient is deprecated?
- When should you use multithreading? And would multi threading be beneficial if the different threads execute mutually independent tasks?
- How to Convert Int to Unsigned Byte and Back
- Suggestions needed: Effective Java to C source code converter
- Downloading a file from spring controllers
- Java Error Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError
- What is an attribute in Java?
- MessageBodyWriter not found for media type=application/json
- Conversion from Long to Double in Java
- Failed to find Java VM
- Java regex email
- Java Iterator on Doubly-linked-list
- Why “no projects found to import”?
- Java Swing setting JPanel Size
- how to use “tab space” while writing in text file