小编Ser*_*gey的帖子

sbt build failed - 找不到模块:org.scala-sbt#sbt; 0.13.5

我试图为现有的Scala项目调整sbt版本是不成功的,该项目之前工作正常,但任何文档都被遗弃了.似乎替换了错误的URL来解决"sbt.jar"的依赖性......

my_project目录里面:

ear
    application.xml
    web-logic-application.xml
project
    target
      config-classes
        *.class
src
    main
      java
        package(java-utils)
      scala
        package(scala)
        my_app.properties
        spring.xml
        ...
      webapp
        WEB-INF
          web.xml
    test
      scala
      resources
 build.sbt
Run Code Online (Sandbox Code Playgroud)

my_project/build.sbt:

name := "my_project"

organization := "my.app"

version := "1.0"

scalaVersion := "2.10.2"
...
libraryDependencies += ...
Run Code Online (Sandbox Code Playgroud)

C:\ Users\svc\.sbt\repositories:

[repositories]
local

maven-central

typesafe: http://repo.typesafe.com/typesafe/releases/

typesafe-snapshots: http://repo.typesafe.com/typesafe/snapshots/
Run Code Online (Sandbox Code Playgroud)

C:\ Users\svc\.sbt\0.13.5\plugins\plugins.sbt:

resolvers += "typesave" at "http://repo.typesafe.com/typesafe/releases"

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")

addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2")
Run Code Online (Sandbox Code Playgroud)

C:\ Program Files(x86)\ sbt\conf\sbtconfig.txt(在本地PC上安装sbt后未更改):

# Set …
Run Code Online (Sandbox Code Playgroud)

java scala sbt web

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

是否可以对 Java 对象使用 Camel 循环?

我使用 Spring+Camel 和 Java 应用程序,但我不明白如何在 Camel 配置中使用 Loop。骆驼医生建议:

<route>
  <from uri="direct:b"/>
  <loop>
    <header>loop</header>
    <to uri="mock:result"/>
  </loop>
</route>
Run Code Online (Sandbox Code Playgroud)

如何针对我的情况调整循环?

<route>
    <from uri="myjms:queue:{{myqueue.name1}}"/>
    ...
    <method bean="myProcessor" method="getSomeMyObjects"> <!-- returns Collection<MyObject> -->
    <loop>
        <header>?????</header> <!-- get single MyObject?.. how???.. -->
        <to uri="myjms:queue:{{myqueue.name2}}"/>
    </loop>
</rout>
Run Code Online (Sandbox Code Playgroud)

豆内:

<bean id="myProcessor" class="my.package.MyProcessor">
Run Code Online (Sandbox Code Playgroud)

我已经实现了以下方法:

getSomeMyObjects()         - returns Collection<MyObject>;
getSomeMyObject(int index) - returns single MyObject;
getSomeMyObjectsCount()    - returns the number of objects inside Collection<MyObject>;
Run Code Online (Sandbox Code Playgroud)

并可以根据需要实施任何其他方法。

是否可以在 Camel 配置中使用循环来解决这个问题?

apache-camel

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

标签 统计

apache-camel ×1

java ×1

sbt ×1

scala ×1

web ×1