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 application.properties (there is no src/main/resources) as it used to be when I would manually create a spring boot application through File->New->...
This is how the structure looks like
I checked out manifest.yml and even typed
server: port : 9090
but it says, unknown property 'server' for type 'Cloudfoundary Manifest'
add application.properties in your resource folder
#--------------------------------
# Tomcat Port
#----------------------------------
server.port = 8080
# ----------------------------------------
# Logging Level
# ----------------------------------------
logging.level.root=error
logging.level.org.springframework=info
logging.level.org.hibernate=error
# ----------------------------------------
# MySQL DataBase Connection Properties
# ----------------------------------------
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/db
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.show-sql=true
# ----------------------------------------
# ACTUATOR PROPERTIES
# ----------------------------------------
endpoints.actuator.enabled=false
management.security.enabled=false
# ----------------------------------------
# DevTols PROPERTIES
# ----------------------------------------
spring.devtools.restart.enabled=true
# ----------------------------------------
# JSP PREFIX/POSTFIX PROPERTIES
# ----------------------------------------
#spring.thymeleaf.prefix=/view/
#spring.thymeleaf.suffix=.html
YOu can add application.properties
You source folder will look like this ignore other files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With