小编rsi*_*va4的帖子

安装假日宝石时出错

我在尝试安装假日gem时收到以下错误:

# gem install holidays
Fetching: holidays-1.0.4.gem (100%)
ERROR:  Error installing holidays:
        holidays requires holidays (>= 0)
Run Code Online (Sandbox Code Playgroud)

我不是一个红宝石家伙,只是为Redmine Backlogs插件安装了一些deps .

版本和环境:

# gem -v
1.8.10

# ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-linux]

CentOS Linux release 6.0 (Final)
# uname -r
2.6.32-71.29.1.el6.i686
Run Code Online (Sandbox Code Playgroud)

ruby rubygems redmine-plugins

9
推荐指数
2
解决办法
2181
查看次数

使用JSON输入步骤处理不均匀的数据

我正在尝试使用JSON输入步骤处理以下内容:

{"address":[
  {"AddressId":"1_1","Street":"A Street"},
  {"AddressId":"1_101","Street":"Another Street"},
  {"AddressId":"1_102","Street":"One more street", "Locality":"Buenos Aires"},
  {"AddressId":"1_102","Locality":"New York"}
]}
Run Code Online (Sandbox Code Playgroud)

然而,这似乎是不可能的:

Json Input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 
The data structure is not the same inside the resource! 
We found 1 values for json path [$..Locality], which is different that the number retourned for path [$..Street] (3509 values). 
We MUST have the same number of values for all paths.
Run Code Online (Sandbox Code Playgroud)

该步骤提供Ignore Missing Path标志,但只有在所有行都错过相同路径时才有效.在这种情况下,步骤按预期运行,用null填充缺失值.

这限制了这一步骤读取不均匀数据的能力,这实际上是我的优先事项之一.

我的步骤字段定义如下:

JSON输入字段定义

我错过了什么吗?这是正确的行为吗?

json pentaho data-integration kettle

9
推荐指数
1
解决办法
2万
查看次数

JBoss AS6 app特定的日志记录

我目前正在将旧的Web应用程序从JBoss As 4.2.2 迁移到6.0.0(AS6).在AS6中,我们有一种专有格式,用于通过名为的文件记录应用程序jboss-logging.xml.

在阅读了一些内容(http://community.jboss.org/wiki/SeparatingApplicationLogs)后得出的结论是"(...)从JBoss AS 6.0.0.M2开始,能够根据应用程序记录单独的日志文件,将以不同的方式实施"并且一旦实施准备就绪,文档"(...)将更新更多细节".

但是我能够在我的server/log目录中创建特定的应用程序日志文件,它是使用目录中的主joboss-logging.xml文件完成的server/deploy.这与我的应用程序所需的模块化不兼容.

所以这里有一个问题,当我为我的应用程序创建一个jboss-logging.xml我的WEB-INF目录时,这个配置:

<?xml version="1.0" encoding="UTF-8"?>
<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0" context="myApp">
   <define-context name="myApp" />

   <periodic-rotating-file-handler
         file-name="${jboss.server.log.dir}/myApp.log"
         name="WEBAPP" autoflush="true" append="true" suffix=".yyyy-MM-dd">
      <error-manager><only-once/></error-manager>
      <formatter>
         <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
      </formatter>
   </periodic-rotating-file-handler>

   <root-logger>
      <!-- Set the root logger priority via a system property, with a default value. -->
      <level name="${jboss.server.log.threshold:INFO}"/>
      <handlers>
         <handler-ref name="WEBAPP"/>
      </handlers> …
Run Code Online (Sandbox Code Playgroud)

java logging jboss jboss6.x

7
推荐指数
2
解决办法
5979
查看次数

Java Application Server的替代品

我已经专业地使用Java应用程序服务器五年了,但我只经历了两个供应商:Weblogic和JBoss,主要是最后一个.

专注于JBoss我目前正在将一些应用程序从4.2.2版本迁移(或至少尝试)到6.x系列的第一个"稳定"版本.但是,我觉得问题比我预期的要复杂得多.类加载,日志记录,启动过程,所有接缝都发生了变化,我相信它会更好,但总会像这样?

所以我质疑自己其他真正的替代品是什么?现有的替代品有同样的问题吗?

你可能会问我用什么功能来要求像JBoss这样的应用服务器:目前是JMS,XA Transactions,Datasources.

java jboss weblogic application-server jboss6.x

6
推荐指数
1
解决办法
5310
查看次数

在父抽象类中使用@Scheduler

我创建了一个像这样的抽象类:

abstract class ScheduledProcess {

  abstract List<String> fetchNewContent()
  abstract List<String> cron()

  //This SPeL doesn't work just stating what kind of expression I'm looking for
  @Scheduled(cron='#{this.cron()}')
  void persistContent(){
     doSomeStuffWithContent(fetchNewContent())
  }

}
Run Code Online (Sandbox Code Playgroud)

我的目标是不要重复自己必须@Scheduled在所有子类中实现该方法。该cron()方法返回特定子类的 cron 表达式。但是我没有找到将 cron 值传递给注释的方法。也许我只是以错误的方式看待这个问题。

java groovy spring spring-el spring-boot

5
推荐指数
1
解决办法
2633
查看次数