This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class UsagesController { | |
| def hazelService | |
| def saveGet = { | |
| def customer = new Customer(name: "John", age: 27) | |
| customer.saveHz() | |
| println "Customer id:"+ customer.id | |
| println "Customer:" + Customer.getHz(customer.id) | |
| render "success" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>spring_hazelcast</groupId> | |
| <artifactId>spring_hazelcast</artifactId> | |
| <version>1.0</version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.springhazelcast; | |
| public class TestBean { | |
| private String result; | |
| public String getResult() { | |
| return result; | |
| } | |
| public void setResult(String result) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.springhazelcast; | |
| public class TestBean { | |
| private String result; | |
| public String getResult() { | |
| return result; | |
| } | |
| public void setResult(String result) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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"> | |
| <bean class="com.springhazelcast.TestBean" name="springTestBean"> | |
| <property name="result" value="success" /> | |
| </bean> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.springhazelcast; | |
| import org.springframework.context.ApplicationContext; | |
| import org.springframework.context.support.GenericXmlApplicationContext; | |
| public class Main { | |
| public static void main(String[] args) { | |
| ApplicationContext ctx = new GenericXmlApplicationContext("beans.xml"); | |
| TestBean testBean = (TestBean) ctx.getBean("springTestBean"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>spring_hazelcast</groupId> | |
| <artifactId>spring_hazelcast</artifactId> | |
| <version>1.0</version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:hz="http://www.hazelcast.com/schema/spring" | |
| xsi:schemaLocation= | |
| "http://www.springframework.org/schema/context | |
| http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.springhazelcast; | |
| import com.hazelcast.core.IMap; | |
| import org.springframework.context.ApplicationContext; | |
| import org.springframework.context.support.GenericXmlApplicationContext; | |
| public class Main { | |
| public static void main(String[] args) { | |
| ApplicationContext ctx = new GenericXmlApplicationContext("beans.xml"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <artifactId>hazelcast_hbase</artifactId> | |
| <dependencies> |