<?xml version='1.0' encoding='utf-8'?>
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- MySQL JNDI -->
    <Resource
        name="JNDI_MySQL"
        auth="Container"
        type="javax.sql.DataSource"
        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
        initialSize="1"
        maxActive="30"
        maxIdle="-1"
        minIdle="-1"
        maxWait="10000"
        testOnBorrow="true"
        testOnReturn="true"
        testWhileIdle="true"
        minEvictableIdleTimeMillis="10000"
        timeBetweenEvictionRunsMillis="300000"
        numTestsPerEvictionRun="5"
        validationQuery="SELECT 1"
        removeAbandonedTimeout="60"
        removeAbandoned="true"
        logAbandoned="true"
        jmxEnabled="false"
        jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
        username="username"
        password="password"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/dbname?useUnicode=true&amp;characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull"
    />

</Context>

'컴퓨터 > Java' 카테고리의 다른 글

Apache Tomcat conf/context.xml JNDI  (0) 2021.03.04
maven web context  (0) 2020.09.15
maven java version  (0) 2020.09.10

+ Recent posts