Skip to content

Instantly share code, notes, and snippets.

View pascaldimassimo's full-sized avatar

Pascal Dimassimo pascaldimassimo

  • Montreal
  • 17:18 (UTC -05:00)
View GitHub Profile
@pascaldimassimo
pascaldimassimo / SolrPager.java
Created July 9, 2015 02:21
Simple code to page through Solr results with httpclient and jackson
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import com.fasterxml.jackson.databind.JsonNode;
@pascaldimassimo
pascaldimassimo / DataSourceConfig.java
Last active November 26, 2020 15:41
Spring Boot config for multiple datasources and EntityManagerFactories
package com.pascaldimassimo.xyz;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.hibernate.cfg.ImprovedNamingStrategy;
import org.springframework.beans.factory.annotation.Autowired;