Reputation: 23
I am Trying to deploy a Spring Boot Web service. Firstly I met No Web Process Running and i resolved It By adding Procfile and It's worked nomarlly until i deployed newest code. I didn't change any thing in pom.xml file and Profile, It's still work in local.
This is my heroku Log error:
Profile:
web: java -jar $JAVA_OPTS -D server.port=$PORT target/SWDProject-0.2.jar
pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>swd</groupId>
<artifactId>SWDProject</artifactId>
<version>0.2</version>
<name>SWDProject</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
Hope you guys can help. Thanks for reading.
Upvotes: 0
Views: 58
Reputation: 106
Removing the blank space before system property server.port should fix this issue.
So instead -D server.port=$PORT
use -Dserver.port=$PORT
.
Upvotes: 2