java.lang.ClassNotFoundException: com.mysql.jdbc.Driver (maven + jboss)

前端 未结 4 1645
轻奢々
轻奢々 2021-01-21 08:02

maven pom.xml



        
4条回答
  •  不要未来只要你来
    2021-01-21 08:31

    It seems you are using JBoss AS7. Check instructions here: https://community.jboss.org/wiki/DataSourceConfigurationInAS7

    Basically, you should

    1. Install mysql connector
    2. Create a data source using it
    3. Refer to that data source using JNDI configuration

    Class.forName() is an idiom commonly used when data sources are not provided by the container. In modern Java EE servers, they are provided.

提交回复
热议问题