quarta-feira, 25 de janeiro de 2017

Add mysql driver to WildFly 10

Take the following steps to install mysql driver on WildFly 10:


1) Copy the jar into ${WILDFLY_HOME}/bin directory

2) Execute ./jboss-cli.sh -- connect

4) Write the following on the shell (adapt to your needs):

module add -–name=com.mysql –-resources=mysql-connector-java-5.1.40.jar –-dependencies=javax.api,javax.transaction.api


5)  Write the following on the shell

/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql",driver-class-name=com.mysql.cj.jdbc.Driver)


6) Write:

:reload

Sem comentários: