Skip to content

Instantly share code, notes, and snippets.

View phillipuniverse's full-sized avatar

Phillip Verheyden phillipuniverse

View GitHub Profile
# Description
# Look at versions for our various modules and how they relate to framework versions
#
# Dependencies:
# "octonode": "^0.6.4"
# "xml2js": "^0.4.4"
#
# Configuration:
# HUBOT_GITHUB_TOKEN - API token from a GitHub account
#
@phillipuniverse
phillipuniverse / Invalidation.java
Last active August 7, 2017 19:19
Invalidate cache for an entity in Broadleaf
@Component
public class SkuInvalidator {
@Autowired
private SystemEventSender eventSender;
public void invalidateSku(Long id) {
SystemEvent event = new SystemEventImpl();
event.setType(EventType.CACHE_INVALIDATION.getType());
event.setEnabled(true);
class X {
@Autowired
private X me;
@Transactional
foo() {
}
@Transactional
@Configuration
public class CustomDatabaseAutoConfiguration extends DatabaseAutoConfiguration {
protected DataSource buildDataSource() {
DatabaseDriver driver = DatabaseDriver.fromJdbcUrl(props.getUrl());
com.zaxxer.hikari.HikariDataSource ds = DataSourceBuilder
.create()
.username(props.getUser())
.password(props.getPassword())
@phillipuniverse
phillipuniverse / Dockerfile
Created July 26, 2018 13:25
Spring Boot exectuable jar Dockerfile with JAVA_OPTS, debugging and JRebel support
# Used as a base image that other Spring Boot-based
# docker containers can be based off of. Example dependent Dockerfile:
#
# FROM <this-image>
# ADD target/myjar.jar /app.jar
#
# Alternatively, you can modify this file to use a build arg:
# ...
# ...
# ARG JAR_FILE
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
[WARNING] The requested profile "SNAPSHOTS" could not be activated because it does not exist.
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:1.21.1:check (check) on project broadleaf-auth-services-samples-main: Execution check of goal com.diffplug.spotless:spotless-maven-plugin:1.21.1:check failed: Unable to load the mojo 'check' (or one of its required components) from the plugin 'com.diffplug.spotless:spotless-maven-plugin:1.21.1': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger
[ERROR] while locating org.apache.maven.repository.internal.DefaultVersionRangeResolver
[ERROR] while locating java.lang.Object annotated with *
[ERROR] at org.eclipse.sisu.wire.LocatorWiring
[ERROR] while locating org.eclipse.aether.impl.VersionRangeResolver
[ERROR] for parameter 2 at org.eclipse.aether.internal.impl.De
@phillipuniverse
phillipuniverse / DemoApplication.java
Last active January 10, 2023 14:57
JUnit 5 integration test with Spring Cloud Stream and embedded Kafka
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
server:
port: 8443
ssl:
key-password: keypass
key-store: classpath:local.keystore
key-store-password: storepass
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS