I am very new in Spring world. I was using application.properties to set different port values. How can I comment some code in application.properties file?
You start line comments with #
Use #
at start line, which ever property needs to be commentted.
Source: https://en.wikipedia.org/wiki/.properties
Starting a line with #
or !
will mark that line as comment.
# This is a comment
! The exclamation mark can also mark text as comments.
Any line that is pre-fixed with # before the data/code per line in your APPLICATION.PROPERTIES file shall be commented.
For Example:
#datasource.url=jdbc:h2:mem:books_data #spring.datasource.driverClassName=org.h2.Driver
The two lines in the APPLICATION.PROPERTIES are treated as comments.
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.