使用与我的本地主机相同的配置运行dropwizard会导致vps错误

时间:2018-07-01 20:33:28

标签: java yaml dropwizard ubuntu-server

当我尝试在ubuntu服务器上运行dropwizard应用程序时,我的conf.yml文件出现错误,该错误未出现在本地开发中。这是conf.yml

  server:
  type: simple
  applicationContextPath: /api
  adminContextPath: /admin
  connector:
    type: https
    port: 8433
    keyStorePath: ./keystore.jks
    keyStorePassword: mypassword
    validateCerts: true

我的PC上的此配置没有错误,但是在vps上却显示:

 conf.yml has an error:
  * Failed to parse configuration at: server.connector; Could not resolve type id 'https' as a subtype of [simple type, class io.dropwizard.jetty.ConnectorFactory]: known type ids = [] (for POJO property 'connector')
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: se.planetdev.ServerConfiguration["server"]->io.dropwizard.server.SimpleServerFactory["connector"])

这是由ubuntu在运行时弄乱conf.yml引起的吗?就像使所有行都在同一行上一样,.yml文件也应以某种方式写入。

感谢您的帮助!

0 个答案:

没有答案