gradleを使って、springbootアプリケーションを作っております。
組み込みtomcatを試そうと、
gradle buildにてjarファイルを作成し、
java -jar build/libs/AAA.jar で実行すると、
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration':・・・・・・・ Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath.
というエラーがでてしまい、実行することができません。
eclipseからの実行と、gradle bootRunコマンドでの実行はできます。
エラーメッセージから推測すると、組み込みデータベースに接続しようとしているのでしょうか。
gradleファイルでは、下記をcompileしております。
compile 'commons-collections:commons-collections:3.2' compile 'org.apache.logging.log4j:log4j-api:2.4' compile 'org.apache.logging.log4j:log4j-core:2.4' compile 'org.springframework.boot:spring-boot-starter-web' compile 'org.springframework.boot:spring-boot-starter-data-jpa' compile 'org.springframework.boot:spring-boot-gradle-plugin' compile 'org.springframework.boot:spring-boot-starter-jdbc' compile 'org.springframework.boot:spring-boot-starter-websocket' compile 'org.modelmapper.extensions:modelmapper-spring:0.7.5' compile 'org.apache.commons:commons-lang3:3.0' compile 'org.springframework.boot:spring-boot-starter-data-elasticsearch:1.2.7.RELEASE' compile 'mysql:mysql-connector-java' compile 'org.lazyluke:log4jdbc-remix:0.2.7' testCompile 'junit:junit:4.+' testCompile 'org.springframework.boot:spring-boot-starter-test' testCompile 'junit:junit:4.+' provided 'org.projectlombok:lombok:1.16.6' provided 'com.fasterxml.jackson.core:jackson-databind'
application.propertiesでmysqlに接続するよう記述し、eclipseからの実行時には正しくmysqlと接続できているため、組み込みデータベースは使っていないのですがエラー修正方法がわかりません。。
解決方法ご存知の方、ご教授いただけますでしょうか
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/02/17 01:08