keytool -genkeypair -keyalg RSA -keysize 2048 -validity 365 -alias ca -dname "CN=ca,O=HMS,S=SE" -keystore ca.jks -storepass password
keytool -exportcert -rfc -alias ca -keystore ca.jks -storepass password > ca.pem
cat ca.pem | keytool -importcert -alias ca -noprompt -keystore trust.jks -storepass password
This file contains 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
{ | |
"title": "0@game-123", | |
"id": "http://192.168.0.16:2113/streams/game-123/0", | |
"updated": "2013-09-08T16:07:53.5242492Z", | |
"author": { | |
"name": "EventStore" | |
}, | |
"summary": "com_jayway_rps_domain_GameCreatedEvent", | |
"content": { | |
"eventStreamId": "game-123", |
This file contains 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
import javax.annotation.PostConstruct; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.ApplicationContext; | |
import com.google.code.morphia.AbstractEntityInterceptor; | |
import com.google.code.morphia.Morphia; | |
import com.google.code.morphia.mapping.Mapper; | |
import com.mongodb.DBObject; |
This file contains 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
/** | |
* Thread-safe xpath with namespace support. | |
*/ | |
public class SimpleXPath { | |
private final String expression; | |
public SimpleXPath(String expression) { | |
this.expression = expression; | |
} |
This file contains 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
import java.io.StringReader; | |
import java.io.StringWriter; | |
import javax.xml.transform.Templates; | |
import javax.xml.transform.TransformerFactory; | |
import javax.xml.transform.stream.StreamResult; | |
import javax.xml.transform.stream.StreamSource; | |
public class SimpleXslt { | |
private Templates templates; |