Skip to content

Instantly share code, notes, and snippets.

View donovanmuller's full-sized avatar

Donovan Muller donovanmuller

View GitHub Profile
package com.jpa.base.repository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import com.jpa.base.entity.Account;
public interface AccountRepository extends CrudRepository<Account, Long>{
public Account findByEmailAddress(@Param(value="emailAddress") String emailAddress);
public Account findByAccountId(@Param(value="accountId") Long accountId);
@donovanmuller
donovanmuller / OrderServiceTest.java
Created June 30, 2014 15:54
SO - 24489963 - Non mappedBy
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class OrderServiceTest {
private static final Logger log = LoggerFactory.getLogger(OrderServiceTest.class);
@Configuration
@ComponentScan(basePackages = "so")
static class OrderServiceConfiguration {
@donovanmuller
donovanmuller / WaiterEntity.java
Created June 30, 2014 15:58
SO - 24489963 - mappedBy
@Entity
@XmlRootElement
@Table(name = "WAITERENTITY")
public class WaiterEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
@donovanmuller
donovanmuller / Application.java
Last active May 6, 2016 21:22
Spring Cloud Consul, Bus (with Kafka binder) and Config causing double Consul registrations
package io.switchbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
public class Application {
...
/**
* Builds the execution command for an application.
*
* @param request the request for the application to execute
* @return the build command as a string array
*/
private String[] buildExecutionCommand(AppDeploymentRequest request) {
ArrayList<String> commands = new ArrayList<String>();
@donovanmuller
donovanmuller / .travis.yml
Created December 15, 2016 20:39
nomad-api to Java 8
language: java
jdk:
- oraclejdk8
@donovanmuller
donovanmuller / main.tf
Last active December 27, 2016 21:26
Terraform plan file to provision GCE hosts for OpenShift Origin install with openshift-ansible
variable "master_instances" {
description = "How many OpenShift master instances do you need?"
default = 1
}
variable "node_instances" {
description = "How many OpenShift node instances do you need?"
default = 2
}
import * as k8s from "@pulumi/kubernetes";
import {CustomResource} from "@pulumi/kubernetes/apiextensions";
// Install the ECK operator
new k8s.yaml.ConfigGroup("eck-operator", {
files: "https://download.elastic.co/downloads/eck/1.0.1/all-in-one.yaml",
});
// create a new Elasticsearch instance
const elastic = new CustomResource("test-elastic", {
module test
go 1.14
require (
github.com/jaxxstorm/pulumi-rke/sdk/v2 v2.0.0-20200622042604-c09f47d0d6f2
github.com/pulumi/pulumi-packet/sdk/v2 v2.2.2
github.com/pulumi/pulumi/sdk/v2 v2.4.0
)