在tomcat中我们定义数据源。在数据源中有一个属性“auth”。通常我曾经将其值等于“容器”。例如。
<Resource name="jdbc/myoracle" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:1521:mysid"
username="scott" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
有人能告诉我这个“auth”属性的意义是什么吗?谷歌搜索后我也找不到这个属性的意义。
最佳答案
遍历 doc ,它解释说:
Specify whether the web Application code signs on to the corresponding resource manager programmatically, or whether the Container will sign on to the resource manager on behalf of the application. The value of this attribute must be Application or Container. This attribute is required if the web application will use a element in the web application deployment descriptor, but is optional if the application uses a instead.
关于java - tomcat中定义的数据源的auth属性的意义是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17107207/