Skip to content

Instantly share code, notes, and snippets.

Avatar

Rufer Marc rufer7

View GitHub Profile
@rufer7
rufer7 / example.yml
Created Jun 6, 2015
Example YAML configuration file for a Dropwizard application
View example.yml
messageTemplate: I'm a dropwizard example resource requested by %s!
defaultName: Stranger
@rufer7
rufer7 / ExampleApplication.java
Created Jun 6, 2015
Example application class for a Dropwizard application
View ExampleApplication.java
/*
* Copyright (C) 2015 Marc Rufer (m.rufer@gmx.ch)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rufer7
rufer7 / ApplicationConfiguration.java
Created Jun 6, 2015
Example application configuration class for a Dropwizard application
View ApplicationConfiguration.java
/*
* Copyright (C) 2015 Marc Rufer (m.rufer@gmx.ch)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rufer7
rufer7 / .gitignore
Created Jun 2, 2015
IDEA-Gitignore for Java
View .gitignore
# Java
*.class
target/
# Package Files
*.jar
*.war
*.ear
# IntelliJ
@rufer7
rufer7 / AllmanCodestyleSample.java
Last active Aug 29, 2015
Allman codestyle for IntelliJ
View AllmanCodestyleSample.java
/**
* Copyright 2015 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rufer7
rufer7 / pom.xml
Created Apr 18, 2015
maven pom.xml-file of flyway-example
View pom.xml
<?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>be.rufer.playground</groupId>
<artifactId>flyway-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Flyway example</name>
@rufer7
rufer7 / additional-spring-configuration-metadata.json
Last active Aug 29, 2015
Metadata for spring configuration
View additional-spring-configuration-metadata.json
"properties": [
{
"name": "sample.property.name",
"type": "java.lang.Integer",
"description": "Description for sample.property.name.",
"defaultValue": 1
},
{
"name": "another.property.name",
"type": "java.lang.String",
@rufer7
rufer7 / SampleHeaderEnricher.java
Last active Aug 29, 2015
Custom header enricher, which returns the headers to add to messages
View SampleHeaderEnricher.java
package be.rufer.amqp.integration.messaging.enricher;
import org.springframework.integration.Message;
import java.util.HashMap;
import java.util.Map;
public class SampleHeaderEnricher {
public Map<String, Object> addCustomHeaders(Message<?> message) {
@rufer7
rufer7 / SampleMessageHandler.java
Created Apr 3, 2015
Sample of a message handler
View SampleMessageHandler.java
package be.rufer.amqp.integration.messaging.handler;
import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.integration.core.MessageHandler;
import java.util.Collections;
public class SampleMessageHandler implements MessageHandler {
@rufer7
rufer7 / swissunihockey-key-matcher-result
Created Mar 26, 2015
Excerpt of the result of swissunihockey-key-matcher
View swissunihockey-key-matcher-result
H1L GF U21C Matches
6 3 3
6 2 3
6 5 3
6 4 3
...