Not found anything interesting so far, so here am I, asking a question.
I got a spring boot application, that runs fine. Problem is : custom configuration ! I want it to run on port 8081 (and not default port 8080). So I added the application.yml in the src/main/resources directory, packaged it... And it run on port 8080 When I run the @SpringBootApplication class from intellij, it does run on port 8081 (I just added the application.yml file.) So why ?
It's a gradle multi module project. T added the application.yml file into the module that is actually packaged into a jar file. It is packaged using tha gradle shadow plugin, and does contain the application.yml file at the root of the jar file.
The application.yml is like this :
server:
port: 8081
I don't really know which information you'll need, so feel free to ask !
Any idea is welcome.
EDIT 1 : "Stacktrace" when I start the server :
java -jar serverApp.jar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
août 29, 2020 5:50:54 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["http-nio-8080"]
août 29, 2020 5:50:54 PM org.apache.catalina.core.StandardService startInternal
INFOS: Starting service [Tomcat]
août 29, 2020 5:50:54 PM org.apache.catalina.core.StandardEngine startInternal
INFOS: Starting Servlet engine: [Apache Tomcat/9.0.37]
août 29, 2020 5:50:54 PM org.apache.catalina.core.ApplicationContext log
INFOS: Initializing Spring embedded WebApplicationContext
août 29, 2020 5:50:55 PM org.apache.coyote.AbstractProtocol start
INFOS: Starting ProtocolHandler ["http-nio-8080"]