
#前回の質問からの新たな問題です。
前回質問者様のご指摘通りに
設定ファイルを修正し、ビルドからアプリの実行まではできるようになりました。
でも、実行後、プロジェクトをみてもdaoやentityが作成されていませんでした。
20190130補足
前回の質問がビルドまでの解決が回答条件でしたので
今回新たに質問を作成しました。ややこしくてすみません。
ビルドしたら作成されると思ったのだが、、
自分で怪しい箇所を洗い出してみました。
- doma-genの記述が足りない
- DBテーブルの構造が悪い→select*で検索できたので問題なさそう
それ以外ピンときません。dbはadsでインスタンス作成しています。
公式のページもみたけどこの書き方でした、、
doma-genに詳しい方ご教授お願い致します。。
設定したファイルはこれです。
######build.gradle
buildscript { ext { springBootVersion = '2.1.1.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' apply plugin: 'war' group = 'sample' version = 'sample' sourceCompatibility = 8 repositories { mavenCentral() } configurations { providedRuntime } dependencies { implementation('org.springframework.boot:spring-boot-starter-security') implementation('org.springframework.boot:spring-boot-starter-thymeleaf') implementation('org.springframework.boot:spring-boot-starter-web') implementation( 'org.springframework.boot:spring-boot-starter-data-jpa') runtimeOnly('org.postgresql:postgresql') providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') testImplementation('org.springframework.boot:spring-boot-starter-test') testImplementation('org.springframework.security:spring-security-test') annotationProcessor "org.seasar.doma.boot:doma-spring-boot-starter:1.1.1" compile("org.seasar.doma.boot:doma-spring-boot-starter:1.1.1"){ exclude group: "org.springframework.boot" } } configurations { domaGenRuntime } repositories { mavenCentral() maven {url 'https://oss.sonatype.org/content/repositories/snapshots/'} } dependencies { domaGenRuntime 'org.seasar.doma:doma-gen:2.21.0' domaGenRuntime 'org.postgresql:org.postgresql.Driver' } task gen << { ant.taskdef(resource: 'domagentask.properties', classpath: configurations.domaGenRuntime.asPath) ant.gen(url: 'jdbc:postgresql://postgres.rds.amazonaws.com:5432/dbsample', user:'postgres', password:'postgres') { entityConfig() daoConfig() sqlConfig() } }
関係なさそうだけど
######application.properties
#DB接続設定 spring.datasource.driver-class-name=org.postgresql.Driver spring.jpa.database=POSTGRESQL spring.datasource.url=jdbc:postgresql://postgres.rds.amazonaws.com:5432/dbsample spring.datasource.username=postgres spring.datasource.password=postgres spring.datasource.sql-script-encoding=UTF-8 #thymleafのhtmlの書式を厳しくするか spring.thymeleaf.cache=false #Log開発環境 #logging.path=C:/pleiades/workspace/test/log/ #logging.path=/home/tomcat8/log/moblie #jpaの設定 spring.jpa.hibernate.ddl-auto=validate spring.jpa.properties.hibernate.format_sql=true spring.jpa.hibernate.ddl-auto=validate #sessionのタイムアウト開発環境 server.servlet.session.timeout=500
回答1件
あなたの回答
tips
プレビュー