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
package be.rufer.swissunihockey; | |
import be.rufer.swissunihockey.matcher.KeyMatcher; | |
import be.rufer.swissunihockey.matcher.MatchingPrinter; | |
import be.rufer.swissunihockey.matcher.domain.MatchingResult; | |
import be.rufer.swissunihockey.matcher.domain.League; | |
import java.time.LocalDate; | |
import java.util.Arrays; | |
import java.util.HashMap; |
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
log4j.logger.org.web.rufer.sample=DEBUG,ROLLINGFILEAPPENDER | |
## Rolling file appender sample | |
log4j.appender.ROLLINGFILEAPPENDER=org.apache.log4j.RollingFileAppender | |
log4j.appender.ROLLINGFILEAPPENDER.File=${catalina.base}/logs/sample.log | |
log4j.appender.ROLLINGFILEAPPENDER.MaxFileSize=25mb | |
log4j.appender.ROLLINGFILEAPPENDER.MaxBackupIndex=3 | |
log4j.appender.ROLLINGFILEAPPENDER.layout=org.apache.log4j.PatternLayout | |
log4j.appender.ROLLINGFILEAPPENDER.layout.ConversionPattern=%d{ISO8601} %-5p %-85.85c - %m%n |
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 org.slf4j.Logger; | |
public class LogSamples { | |
private static final Logger LOG = LoggerFactory.getLogger(LogSamples.class); | |
public static void main(String args[]){ | |
Object o = new Object; | |
// Sample 1 |
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
package be.rufer.amqp.integration.messaging.handler.error; | |
import org.springframework.amqp.AmqpRejectAndDontRequeueException; | |
import org.springframework.util.ErrorHandler; | |
public class DefaultErrorHandler implements ErrorHandler { | |
@Override | |
public void handleError(Throwable throwable) { | |
throw new AmqpRejectAndDontRequeueException(throwable); |
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
package be.rufer.amqp.integration.messaging.gateway; | |
import org.springframework.integration.Message; | |
public interface SampleGateway { | |
void sendSomething(@Payload Object object, @Header("header-key") headerValue); | |
} |
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
<?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:int="http://www.springframework.org/schema/integration" | |
xmlns:int-amqp="http://www.springframework.org/schema/integration/amqp" | |
xmlns:rabbit="http://www.springframework.org/schema/rabbit" | |
xsi:schemaLocation="http://www.springframework.org/schema/integration/amqp | |
http://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd | |
http://www.springframework.org/schema/integration | |
http://www.springframework.org/schema/integration/spring-integration.xsd |
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 be.rufer.swisscom.sms.api.client.SwisscomSmsSender; | |
import be.rufer.swisscom.sms.api.domain.CommunicationWrapper; | |
public class SwisscomSmsSenderExample | |
{ | |
public static void main( String[] args ) | |
{ | |
// SENDER_NUMBER and RECEIVER_NUMBER1 in the following format: +41791234567 | |
SwisscomSmsSender smsSender = new SwisscomSmsSender("API_KEY", "SENDER_NUMBER"); | |
CommunicationWrapper response = smsSender.sendSms("MESSAGE", "RECEIVER_NUMBER1"); |
NewerOlder