平常我们配置数据源可能都是明文的配置下数据库用户和密码连上数据库就ok,但是有些用户感觉这明文的密码还是很不爽的,那么我们就需要给密码加密了,进入正题: 我的数据源配置是tomcat 目录下面 conf 文件夹下面的 context.xml文件:(这是未加密的配置)
<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<context>
<!-- Default set of monitored resources 172.16.5.28:KM-->
<watchedresource>WEB-INF/web.xml</watchedresource>
<resource
name="jdbc/test"
auth="Container"
type="javax.sql.DataSource"
maxactive="500"
maxidle="30"
maxwait="10000"
&nbs