application.properties文件中的配置是
spring.datasource.url=jdbc:postgresql://localhost:1234/db_name?ssl=true&sslmode=require&sslrootcert=ca.crt&sslkey=client.some_cert.key8&sslcert=client.some_cert.crt
文件位于基于Maven的Spring Boot应用程序的资源文件夹中,但我一直在获取java.io.FileNotFoundException
引用这些文件的最佳方法是什么?
答案 0 :(得分:0)
如果Java没有Class来读取C#上的ConfigurationManager之类的变量,则可以读取文件并按标记进行搜索,并取== p之后的值。
答案 1 :(得分:0)
缺少参数时,它不会返回此异常,而是会返回缺少的属性,并发布完整的异常。