Linked Questions
42 questions linked to/from How to configure port for a Spring Boot application
12
votes
4
answers
31k
views
How to change embebed-tomcat default port using spring boot? [duplicate]
I am using spring-boot with maven, this is my configuration class:
package hello;
import javax.servlet.MultipartConfigElement;
import org.springframework.boot.SpringApplication;
import org....
2
votes
1
answer
3k
views
In Springboot, is there any way to change the port other than setting it up in application.properties? [duplicate]
I am new to Springboot, just watch a tutorial saying that if I would like to change port, I must do it in the application.properties. I wonder if there is any ways to change the port. Thanks in ...
0
votes
1
answer
1k
views
Spring & Docker: localhost didn’t send any data [duplicate]
I have built a RESTful Web Service using with Spring (Maven) referring to this guide and it works great:
https://spring.io/guides/gs/rest-service/
Now I wanted to launch this in a container using ...
0
votes
0
answers
607
views
How to change port for spring boot [duplicate]
I am working on a spring boot project. Using spring tool suite. When I try to run my application console says:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )...
84
votes
6
answers
185k
views
Maven spring boot run debug with arguments
Usually I'm running my Spring Boot application with command:
mvn spring-boot:run -Drun.arguments=--server.port=9090 \
-Dpath.to.config.dir=/var/data/my/config/dir
I want to set custom port to ...
36
votes
5
answers
67k
views
Configure Spring Boot with two ports
I'm trying configure an application in Spring Boot with two differents ports, but I haven't got still.
My first approximation has been with two controllers and I have defined a @Bean inside the two ...
12
votes
3
answers
20k
views
How to change the port of a Spring Boot application using Gradle?
The simple question is: How can you change the Spring Boot application port with gradle?
Here are already listed a lot of correct answers if you are not using gradle. So for none gradle issues, please ...
16
votes
2
answers
7k
views
Running Spring app built with gradle on Heroku
I have problem with my Spring application built with Gradle. App includes MongoDB(MongoHQ from Heroku).
I managed how to push everything on heroku, I've added this code to my project:
@Configuration
...
8
votes
2
answers
17k
views
Integration tests on spring-boot throws Connection refused
I have an unit test on Spring Boot:
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class)
public class CustomerControllerIT {
private RestTemplate restTemplate = new ...
8
votes
3
answers
9k
views
Spring Boot + Tomcat ignoring server.port property?
I'm currently trying to get a Spring Boot application up and running with some small configuration changes, but I can't seem to get the port to listen correctly. It seems that the server.xml that the ...
4
votes
4
answers
22k
views
How to change port number for tomcat server using maven
I am writing a Rest service using spring mvc framework and maven. I am using tomcat server for now. My pom for the project is
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://...
7
votes
1
answer
5k
views
what is the maven command to run springboot app on a desired port
I am trying to run my springboot application using maven command on windows command prompt.
I am trying to run the app on port 8000.
I tried the below command, but app always attempts to start at ...
5
votes
2
answers
6k
views
Changing port number in Spring boot program. No application.properties
I just imported a java project from spring.io https://spring.io/guides/gs/rest-service/
I did it in my eclipse. I want to change the port number for the embedded tomcat to run but I can't see any ...
3
votes
2
answers
6k
views
docker runs image on wrong port
I have a spring boot application and I created dockerfile like this one :
FROM java:8
EXPOSE 80
ADD /target/test-server.jar test-server.jar
ENTRYPOINT ["java","-jar","test-server.jar"]
Next I follow ...
2
votes
2
answers
8k
views
Spring boot application not honoring VM options for server port
I am using IntelliJ, Maven, Spring-boot.
I am trying to set the port to 8001 using VM options(3rd tab(runner), uncheck the "use project settings") as given in many answers on stack overflow. These ...