2017-06-30 7 views
0

私がドッキングウィンドウを使用すると、すべてのノードがこの設定を持っているインストールLIBS ignite-zookeeper,ignite-rest-httpと外部https://github.com/mybatis/ignite-cache/releases/download/mybatis-ignite-1.0.5/mybatis-ignite-1.0.5.jarどのように設定1つのIgnite XMLの設定でMyBatisの、Javaファイルなし

で発火:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
xmlns:util="http://www.springframework.org/schema/util" 
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.xsd 
http://www.springframework.org/schema/util 
http://www.springframework.org/schema/util/spring-util.xsd"> 
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> 
    <!-- Configuring cache. --> 
    <property name="cacheConfiguration"> 
    <list> 
     <bean class="org.apache.ignite.configuration.CacheConfiguration"> 
      <property name="name" value="Person" /> 
      <property name="cacheMode" value="PARTITIONED" /> 
      <property name="atomicityMode" value="TRANSACTIONAL" /> 
      <property name="writeSynchronizationMode" value="FULL_SYNC" /> 
      <property name="queryEntities"> 
       <list> 
       <bean class="org.apache.ignite.cache.QueryEntity"> 
        <property name="keyType" value="java.lang.Long" /> 
        <property name="valueType" value="Person" /> 
        <property name="fields"> 
         <map> 
          <entry key="firstName" value="java.lang.String" /> 
          <entry key="lastName" value="java.lang.String" /> 
          <entry key="resume" value="java.lang.String" /> 
          <entry key="salary" value="java.lang.Integer" /> 
         </map> 
        </property> 
        <property name="indexes"> 
         <list> 
          <bean class="org.apache.ignite.cache.QueryIndex"> 
          <constructor-arg value="salary" /> 
          </bean> 
         </list> 
        </property> 
       </bean> 
       </list> 
      </property> 
     </bean> 
    </list> 
    </property> 
    <property name="discoverySpi"> 
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> 
     <property name="ipFinder"> 
      <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder"> 
       <property name="allowDuplicateRegistrations" value="false" /> 
       <property name="basePath" value="/ignite" /> 
       <property name="serviceName" value="Service" /> 
       <property name="zkConnectionString" value="zk.zookeeper:2181" /> 
      </bean> 
     </property> 
    </bean> 
    </property> 
</bean> 
</beans> 

は、それは、SQLクエリを作成することは可能です同じ設定ファイルで、残りのAPI経由で呼び出すことができますか?例えば :

curl http://host:port/ignite?cmd=exe&name=getUser&id=1

、残りのAPIは、SQLクエリSELECT * FROM PERSON WHERE _key = #{id}と戻り結果

答えて

関連する問題