小编dim*_*zak的帖子

Nginx proxy_pass 所有url参数

我想代理这样的请求: http://myproxy.com/api/folder1/result1?test=1
http://myproxy.com/api/folder3447/something?var=one

到等效目的地:http://destination.com/folder1/result1?test=1http://destination.com/folder3447/something?var=one,实际上只有域发生变化,所有子文件夹和参数都被保留

配置中的位置如下所示:

location ~* ^/api/(.*) {
    proxy_pass http://destination.com/$1$is_args$args;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    #proxy_set_header  Host $http_host;
  }
Run Code Online (Sandbox Code Playgroud)

nginx

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

Deploying two Spring batch applications in same cluster in a single Weblogic Domain?

BackGround -

I am trying to deploy two spring batch applications as .war in same cluster in a single Weblogic Domain & each of them have spring batch admin console configured in servlet.xml like below -

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

  <!-- Spring Batch Admin -->  
  <import resource="classpath*:/org/springframework/batch/admin/web/resources/servlet-config.xml"/>
  <import resource="classpath*:/org/springframework/batch/admin/web/resources/webapp-config.xml"/>

  <bean id="resourceService" class="org.springframework.batch.admin.web.resources.DefaultResourceService">
    <property name="servletPath" value="/batch" />
  </bean>  

</beans>
Run Code Online (Sandbox Code Playgroud)

Its a maven project & spring-batch-admin-manager 1.2.2 is pulled in as dependency.

Problem -
I am struggling …

java weblogic spring-batch spring-batch-admin

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

if语句中的Spel错误(xml配置)

我试图spel if statement在xml配置中使用但没有成功:

xml的一部分:

<bean id="ExportReader"
                class="org.springframework.batch.item.file.MultiResourceItemReader"
                scope="step">
                <property name="resources" value="#{jobParameters['isIncremental'] eq 1? '${step3.index.incremental.folder}/#{stepExecutionContext['fileName']}/*.xml' : true }">
                <property name="delegate" ref="staxPatentReader"></property>
                <property name="strict" value="true"></property>
        </bean>
Run Code Online (Sandbox Code Playgroud)

${step3.index.incremental.folder}工作=>解析为C:/,但第二部分失败,所以我喜欢的资源C:/#{stepExecutionContext['fileName']}/*.xml

我想有一个问题是逃避单引号...

另一件事是这个xml工作正常:

<bean id="indexFolderPartitioner"class="com.mycompany.FolderPartitioner" scope="step">
                <property name="folder" value="#{jobParameters['isIncremental'] eq 1? '${step3.index.incremental.folder}' : '${step3.index.full.folder}' }"></property>
        </bean>
Run Code Online (Sandbox Code Playgroud)

xml spring spring-batch spring-el

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

跨群集的ElasticSearch快照

最近我snapshot在一个elasticsearch由3个数据节点组成的集群中创建了一个索引.

我的主要目的是将此索引移动到另一个群集中.

我用过的命令:

PUT /_snapshot/my_backup

{
    "type": "fs",
    "settings": {
        "location": "/home/me/backup",
        "compress": true
    }
}


PUT _snapshot/my_backup/snapshot_1?wait_for_completion=true
{
  "indices": "daily-20141127"
}
Run Code Online (Sandbox Code Playgroud)

注意:上述查询在同一数据节点中执行.

Snapshot已在上述位置成功创建,但在我查询查询的另一个节点中,此备份位置中的每个节点都有一个文件夹(名称:indices),其中包含等效节点上的备份索引的分片.

示例:
node1:home/me/my_backup/indices/1,2,3
node2:home/me/my_backup/indices/4,5,6
node3:home/me/my_backup/indices/7,8,9

因此,我不得不手动将群集中的所有索引文件夹复制到具有快照元数据的节点以完成备份.然后我将备份文件夹复制到新的群集并恢复它(恢复过程很好)

备份索引的所有索引文件夹都可以在1个节点中,而不是跨群集拆分吗?

elasticsearch

0
推荐指数
1
解决办法
2286
查看次数