首页 > 解决方案 > 在springboot中保护数据库

问题描述

我在application.properties中有数据库配置,如下所示:

spring.database.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/deebee
spring.datasource.username=postgres
spring.datasource.password=shivendra

不知何故,直接写用户名和密码对我来说似乎是一个安全问题。像我现在这样的数据库配置可以吗?

另外,我没有为我的应用程序中的数据库安全做任何事情,spring boot 是否为保护数据库提供了任何东西?

标签: javadatabasepostgresqlspring-boot

解决方案


推荐阅读