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.
Removing the blank space before system property server.port should fix this issue.
So instead -D server.port=$PORT
use -Dserver.port=$PORT
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.