安裝地址:https://www.keycloak.org/archive/downloads-4.4.0.htmlcss
參考文檔:https://www.keycloak.org/docs/latest/server_installation/index.html#guide-overviewhtml
<?xml version="1.0" ?> <module xmlns="urn:jboss:module:1.3" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.40.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
添加DataSource:前端
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" use-java-context="true"> <connection-url>jdbc:mysql://localhost:3306/keycloak?useSSL=false&tcpRcvBuf=102400000</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <driver>mysql</driver> <security> <user-name>root</user-name> <password>root</password> </security> </datasource> <drivers> <driver name="mysql" module="com.mysql"> <!-- <driver-class>com.mysql.jdbc.Driver</driver-class> --> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> </drivers>
在/bin目錄下啓動standalone.bat。java