JHipster问题杂集

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31424825/article/details/82019429

作者:LoveEmperor-王子様

官网 managing profiles:https://www.jhipster.tech/profiles/

一、JHipster打包后,在Linux上运行出现如下错误:

2018-08-24 14:35:08.238 ERROR 19063 --- [ject-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase   : Liquibase could not start correctly, your database is NOT ready: Could not acquire change log lock.  Currently locked by web_server (192.168.1.94) since 8/24/18 2:28 PM

liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by web_server (192.168.1.94) since 8/24/18 2:28 PM
    at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:190)
    at liquibase.Liquibase.update(Liquibase.java:196)
    at liquibase.Liquibase.update(Liquibase.java:192)
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
    at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:103)
    at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:83)
    at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:68)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

^C24-Aug-2018 14:38:02.387 INFO [Thread-7] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-9208"]
24-Aug-2018 14:38:02.441 INFO [Thread-7] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-58009"]

原因:运行时没有指定运行环境的文件:dev、prod;
在没有指定文件前,还会报错

指定环境文件:
* application.yml里:
*

spring:
    application:
        name: invoiceproject
    profiles:
        # The commented value for `active` can be replaced with valid Spring profiles to load.
        # Otherwise, it will be filled in by maven when building the WAR file
        # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
        active: dev

active指定文件:dev或prod;

在开发完成后可以先指定文件;后上传生成服务器;

猜你喜欢

转载自blog.csdn.net/qq_31424825/article/details/82019429
今日推荐