Next, we need to run our application and trigger API methods. Add a file named application.properties to your application resources folder:
spring.application.name= Journaler API server.port= 9000
This will represent the configuration of our local development environment. Thanks to Spring Boot, it is possible to externalize configuration so we can work with the same application code in different environments.
So, what have we done in these three lines?
- spring.application.name: We assigned the application name
- server.port: We assigned the port on which our application will start and listen
What else can be configured? First of all, we can configure logging. Let's extend our application.properties:
... logging.level.root=INFO logging.level.com.journaler.api=DEBUG logging.level.org.springframework.jdbc=ERROR
The following log levels are supported...