私のバックエンドプロジェクトにjhipsterを使用しようとしていますが、要件の1つはmssqlを使用することです。 https://github.com/jhipster/generator-jhipster/issues/4612#issuecomment-265076842JhipsterでMSSQLを設定する際の問題
@ruddel iはJhipster初期実体がLiquiBaseをすることにより、ゲートウェイプロジェクトとMicroserviceのために生成することができるように、Mavenのコマンドを実行する必要があり、これを設定した後、この
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:sqlserver://localhost:1433;database=msqltest
username: SA
password: yourStrong(!)Password
hikari:
.........
jpa:
database-platform: org.hibernate.dialect.SQLServer2012Dialect
database: SQL_SERVER
.........
を使用するように私に助言しなかった:私の前の質問に基づいて、 jhipster
liquibase:diff
によってガイドにつき、このコマンドを使用して、このエラーが発生しました:
[INFO] Settings
----------------------------
[INFO] driver: com.zaxxer.hikari.HikariConfig
[INFO] url: jdbc:sqlserver://localhost:1433;database=IASDB
[INFO] username: devuser
[INFO] password: *****
[INFO] use empty password: false
[INFO] properties file: null
[INFO] properties file will override? false
[INFO] prompt on non-local database? true
[INFO] clear checksums? false
[INFO] changeLogFile: src/main/resources/config/liquibase/master.xml
[INFO] context(s): null
[INFO] label(s): null
[INFO] referenceDriver: null
[INFO] referenceUrl: hibernate:spring:com.mbb.ias.domain?dialect=org.hibernate.dialect.SQLServer2012Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.Spate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
[INFO] referenceUsername: null
[INFO] referencePassword: null
[INFO] referenceDefaultSchema: null
[INFO] diffChangeLogFile: src/main/resources/config/liquibase/changelog/20161208102850_changelog.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.109 s
[INFO] Finished at: 2016-12-08T18:28:54+08:00
[INFO] Final Memory: 37M/342M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.zaxxer.hikari.HikariConfig cannot be cast to java.sql.Driver -> [Help 1]
ので、私は戻って、彼らは私が通りましたものpom.xml内の設定を変更することを言及しましたjhipsterを参照してください。
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<changeLogFile>src/main/resources/config/liquibase/master.xml</changeLogFile>
<diffChangeLogFile>src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver>com.zaxxer.hikari.HikariConfig</driver>
<url>jdbc:sqlserver://localhost:1433;database=IASDB</url>
<defaultSchemaName>IASDB</defaultSchemaName>
<username>devuser</username>
<password>CIATopSecret</password>
<referenceUrl>hibernate:spring:com.mbb.ias.domain?dialect=org.hibernate.dialect.SQLServer2012Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>
それはMSGまたはこの上記のとおりのエラーをHROWます:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.zaxxer.hikari.HikariConfig cannot be cast to java.sql.Driver -> [Help 1]
私はcom.microsoft.SQLServerDriverを使用するために私のPOMを変更しようとしなかった
、それは私に
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:diff (default-cli) on project ias-gateway: Error setting up or running Liquibase: liquibase.exception.DatabaseExceptionnot find database driver: com.microsoft.SQLServerDriver -> [Help 1]
誰でも投げます私のポンを変える方法を教える?私はサブジェネレータを使用したい場合、私はエンティティを1つずつ生成する必要がありますか?ごめんなさい。ここに私のJhipster情報は次のとおりです。
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
```yaml
{
"generator-jhipster": {
"jhipsterVersion": "3.12.0",
"baseName": "IASGateway",
"packageName": "com.mbb.ias",
"packageFolder": "com/mbb/ias",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": "kafka",
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSocialSignIn": false,
"jwtSecretKey": "3f2b1ccd09c528361c2b0f321f96fb62728e9830",
"useSass": false,
"applicationType": "gateway",
"testFrameworks": [
"gatling"
],
"jhiPrefix": "jhi",
"enableTranslation": false
}
}
```
##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
ls: no such file or directory: .jhipster/*.json
##### **Browsers and Operating System**
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
git version 2.10.2.windows.1
node: v7.2.1
npm: 3.10.10
bower: 1.8.0
gulp:
[18:56:33] CLI version 1.2.2
[18:56:33] Local version 3.9.1
yeoman: 1.8.5