java properties file using multiple lines for one property

Use \ at the end of the line like

  someSQL = select result \
              from myTable \
              where y = 2  \
              and x = ? \
              order by z

Also, beware of any trailing whitespaces since Java looks for consecutive backslash+linebreak when assembling the lines.

Put differently : The backslash has to be the very last caracter on the line before the line break.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)