Skip to content

Instantly share code, notes, and snippets.

View ghillert's full-sized avatar
🇩🇪

Gunnar Hillert ghillert

🇩🇪
View GitHub Profile
@ghillert
ghillert / gist:3948328
Created October 24, 2012 19:38
XQuery - Sedna + BaseX
14:47:32.498 WARN [main][org.springframework.beans.GenericTypeAwarePropertyDescriptor] Invalid JavaBean property 'port' being accessed! Ambiguous write methods found next to actually used [public void net.xqj.basex.BaseXXQDataSource.setPort(java.lang.String)]: [public void net.xqj.basex.BaseXXQDataSource.setPort(int)]
java.lang.RuntimeException: The key "125" was not found in the Resouce Message Bundle.
at net.xqj.basex.bin.aa.a(Unknown Source)
at net.xqj.basex.bin.A.a(Unknown Source)
at net.xqj.basex.bin.Z.a(Unknown Source)
at net.xqj.basex.bin.c.<init>(Unknown Source)
at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source)
at net.xqj.basex.bin.d.<clinit>(Unknown Source)
at net.xqj.basex.BaseXXQDataSource.a(Unknown Source)
at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source)
@ghillert
ghillert / hadoop-count-hashtags
Created September 7, 2013 04:55
Counting Hashtags with Hadoop
package org.springframework.xd.examples.hadoop;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
@ghillert
ghillert / Spring Boot and JSPs
Last active August 30, 2017 21:29
Spring Boot (embedded) and JSPs - Remove the last web.xml remnants
...
public class DevNexusApplication implements EmbeddedServletContainerCustomizer {
...
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
if(container instanceof TomcatEmbeddedServletContainerFactory) {
final TomcatEmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory
= (TomcatEmbeddedServletContainerFactory) container;
tomcatEmbeddedServletContainerFactory.addContextCustomizers(
[
{
"latitude": 38.907774,
"longitude": -77.023736,
"address1": "1317 9th St NW",
"city": "Washington",
"state": "DC",
"zip": "20001",
"type": "Service"
},
@ghillert
ghillert / authentication-uaa-spring.md
Last active November 8, 2018 09:08
Authentication with CF UAA using Spring Security OAuth

Checkout, Build and Run UAA:

$ git clone https://github.com/cloudfoundry/uaa.git
$ cd uaa/
$ ./gradlew  run

In a separate window, check if the UAA server is running:

@ghillert
ghillert / uaa-with-role-mapping.md
Last active October 25, 2019 07:28
Data Flow + UAA with Role Mapping

Create a base directory where we store everything.

Requirements

In case you run into issues installing uaac, you may have to set

@ghillert
ghillert / coherence-3.0.0-m2-session-pom.xml
Last active July 13, 2021 18:01
coherence-3.0.0-m2-session-pom.xml
<dependency>
<groupId>com.oracle.coherence.spring</groupId>
<artifactId>coherence-spring-boot-starter</artifactId>
<version>3.0.0-M2</version>
</dependency>
<dependency>
<groupId>com.oracle.coherence.spring</groupId>
<artifactId>coherence-spring-session</artifactId>
<version>3.0.0-M2</version>
</dependency>
@ghillert
ghillert / coherence-3.0.0-m2-session-application.yaml
Last active July 13, 2021 06:13
coherence-3.0.0-m2-session-application.yaml
spring:
session:
timeout: 15m
...
# The optional session management endpoint is suppored as well:
management:
endpoint:
sessions:
enabled: true
endpoints:
@ghillert
ghillert / coherence-3.0.0-m2-topics-publisher.java
Created July 13, 2021 06:37
coherence-3.0.0-m2-topics-publisher.java
@CoherencePublisher
public interface ProductClient {
@Topic("my-products")
void sendProduct(Product product);
}
@CoherenceTopicListener
@Topic("my-products")
public void receive(Element<Product> product) {
// ... process message ...
}