I have 3 .sql files:

drop.sql (reset the DBMS every time I start the webapp)

schema.sql (contains the DBMS schema)

data.sql (contains the records of some users and some roles)

I also have 2 .properties files

application-sviluppo.properties (I use it on my PC)

application.properties (I will use it for the SERVER)

I wanted to update the pom.xml with Spring Boot 2.5.2 but I can't figure out how I should change my files.

File application-sviluppo.properties

spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=j***
spring.datasource.username=***
spring.datasource.password=***
spring.datasource.schema = classpath:drop.sql, classpath:schema.sql
logging.level.org.springframework=INFO
spring.datasource.initialization-mode=always
spring.datasource.continue-on-error=false

File application.properties

spring.profiles.active=sviluppo
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=***
spring.datasource.username=***
spring.datasource.password=***
logging.level.org.springframework=INFO
spring.datasource.initialization-mode=always
spring.datasource.continue-on-error=false

I have made many attempts but without success. The code I'm using now works fine but IntelliJ tells me it's deprecated.

@jonatan-ivanov , what do you think about it?

Comment From: wilkinsona

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

Comment From: fedegibut

Thanks for the feedback but I think it is a bug because I have already tried in all ways. I have made dozens of attempts, I have read the documentation, etc ... I have already also written on the forum that you write and nobody answers.

https://stackoverflow.com/questions/68072000/how-to-edit-properties-files-with-spring-security-2-5-1

Federico Galimberti @.***

Il giorno mer 30 giu 2021 alle ore 16:06 Andy Wilkinson ***@***.*** ha scritto:

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow http://stackoverflow.com/. As mentioned in the guidelines for contributing https://github.com/spring-projects/spring-boot/blob/master/CONTRIBUTING.adoc#using-github-issues, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/27130#issuecomment-871435722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTJDCYBN5CAJFCJUDTY233TVMQE3ANCNFSM47SKLENA .

Comment From: wilkinsona

I've left a comment on your question as it's not clear to me at the moment. Based on what you've said here, I think it may be about deprecated configuration properties. Can you please update your question to clarify things?

Comment From: fedegibut

The 2 .properties files I wrote work 100%. I am using these files in my webapp. The problem is that the Spring Boot 2.5.2 documentation introduces new code starting with spring.sql.init. IntelliJ suggests using spring.sql.init... and defines my codes as deprecated codes. I would like to modernize my working code only because it is defined deprecated. I have tried so many ways but without solving so I don't understand which code I should use.

Comment From: mbhave

@fedegibut Please clarify what you mean by "without solving". What is the issue that you're facing? Replacing the deprecated datasource propreties with spring.sql.init.* is the right thing to do when upgrading to Spring Boot 2.5.x. As Andy suggested, please update the StackOverflow question with more details about what specific failure you're seeing when switching to spring.sql.init.*.

Comment From: fedegibut

@jonatan-ivanov @mbhave @wilkinsona

I created a full thread: https://stackoverflow.com/questions/68072000/how-to-edit-properties-files-with-spring-boot-2-5-2

# This code is deprecated but it works.
spring.datasource.schema = classpath:drop.sql, classpath:schema.sql
# This code is not deprecated, it is recommended but it does not work.
#spring.sql.init.schema-locations = classpath:drop.sql, classpath:schema.sql