Skip to content

Instantly share code, notes, and snippets.

View odrotbohm's full-sized avatar
👨‍💻
@ home

Oliver Drotbohm odrotbohm

👨‍💻
@ home
View GitHub Profile
[INFO] --- com.springsource.bundlor.maven:1.0.0.RELEASE:bundlor (bundlor) @ spring-data-neo4j-parent ---
[INFO] Ignored project with type = 'pom'
[INFO]
[INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ spring-data-neo4j-parent >>>
[INFO]
[INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ spring-data-neo4j-parent <<<
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ spring-data-neo4j-parent ---
[INFO]
[INFO] >>> maven-javadoc-plugin:2.8:aggregate (default) @ spring-data-neo4j-parent >>>
2013-02-12 16:19:10,163 ERROR ramework.test.context.TestContextManager: 324 - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@c303a60] to prepare test instance [org.springframework.data.example.ApplicationIntegrationTest@4fc0cb76]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:157) ~[spring-test-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) ~[spring-test-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) ~[spring-test-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextMan
@odrotbohm
odrotbohm / gist:5047742
Last active December 14, 2015 07:08
Lazy-init config for SpringSecurity PermissionEvalutor implementations
<security:global-method-security pre-post-annotations="enabled">
<security:expression-handler ref="methodExpressionHandler"/>
</security:global-method-security>
<bean id="methodExpressionHandler" class="org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler">
<property name="permissionEvaluator">
<bean class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.LazyInitTargetSource">
<property name="targetBeanName" value="evaluator" />
@odrotbohm
odrotbohm / Development guidelines.md
Last active December 14, 2015 16:39
A loose collection of development guidelines that I apply to my day to day work. Will be updated continuously.

Apply code cleanups

Code formatting applied - Code is auto-formatted by using the project's formatter to avoid formatting related changes polluting the changeset. This includes using Eclipse Save Actions such as organizing imports.

Commits include tests

Commits are backed by tests - Every commit includes test cases to verify the change fixing an issue or the code working generally. This ensures we continuously improve the code coverage even if the original codebase is not exhaustively covered by tests.

Commit refs ticktet

Every commit is referencing a ticket - To give a change a broader context every change to the code base refers to a ticket in either JIRA or the GitHub bug tracker. This allows traceability and a quick zoom in or out in terms of high level requirements and low level necessary code changes.

Linear history

@odrotbohm
odrotbohm / JavaConfigWithQualifierTests.java
Last active February 24, 2016 11:48
Sample test case showing how to use Spring JavaConfig with qualifiers
/*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
BrokenAspect: Method enter!execution(FactoryBean.getObjectType())
BrokenAspect: Method enter!execution(FactoryBean.getObjectType())
BrokenAspect: Method enter!execution(FactoryBean.getObjectType())
BrokenAspect: Method enter!execution(FactoryBean.getObjectType())
BrokenAspect: Method enter!execution(TransactionAttributeSource.getTransactionAttribute(..))
BrokenAspect: Method enter!execution(TransactionAttributeSource.getTransactionAttribute(..))
BrokenAspect: Method enter!execution(PlatformTransactionManager.getTransaction(..))
BrokenAspect: Method enter!execution(SessionFactory.openSession())
BrokenAspect: Method enter!execution(DataSource.getConnection())
BrokenAspect: Method enter!execution(TweetService.getAllTweets())
@odrotbohm
odrotbohm / gist:5712700
Created June 5, 2013 09:20
STS crash dump
Process: STS [52734]
Path: /Applications/Tools/*/STS.app/Contents/MacOS/STS
Identifier: org.springsource.sts.ide
Version: 3.3.0 (3.3.0.201305210239-CI-B1145875-e38)
Code Type: X86-64 (Native)
Parent Process: launchd [177]
User ID: 501
Date/Time: 2013-06-05 11:17:02.602 +0200
OS Version: Mac OS X 10.8.3 (12D78)
@MappedSuperclass
public abstract class AbstractAuditable<U, PK extends Serializable> extends AbstractPersistable<PK> implements
Auditable<U, PK> {
// …
}
@odrotbohm
odrotbohm / MyComponentImpl.java
Last active November 3, 2020 08:22
Constructor injection example with Lombok
/**
* Sample component implementation showing the usage of constructor injection
* avoiding the need to declare a constructor by the help of Lombok. There are
* several advantages of using constructor injection over field injection:
*
* <ol>
* <li>The class communicates its dependencies. Just start with {@code new
* MyDependencyImpl(…}and your IDE will tell you what you need to hand it in. No
* need to look into the implementation of the class to discover that.</li>
* <li>The class can only be used in valid state. The constructor argument require
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Polyglot Tesla :: Aggregator ...................... SUCCESS [3.804s]
[INFO] Polyglot Tesla :: Common .......................... SUCCESS [18.580s]
[INFO] Polyglot Tesla :: Atom ............................ SUCCESS [10.898s]
[INFO] Polyglot Tesla :: Ruby ............................ FAILURE [15.009s]
[INFO] Polyglot Tesla :: Groovy .......................... SKIPPED
[INFO] Polyglot Tesla :: YAML ............................ SKIPPED
[INFO] Polyglot Tesla :: Clojure ......................... SKIPPED