Dynamic SFTP Connection Factory for Spring Integration
December 20th, 2017
Dynamic SFTP Connection Factory for Spring Integration
Dynamic SFTP Connection Factory for Spring Integration
A simple example of serializing objects with Groovy traits using the Jackson library.
Example of how to pass command line arguments to a Spring Boot Application via the bootRun task in Gradle.
What to do when you get org.bson.codecs.configuration.CodecConfigurationException: cant find a codec for class java.math.BigDecimal.
This post will look at how to set up a simple router and get global error handling in place using the new webflux.fn routing available in Spring 5.
Functional Testing With Embedded Kafka in a Spring Boot Application using a Gradle task.
Aggregate Services into a Single Swagger
Automatically mask sensitive fields in Log4j 2 to protect your users privacy and comply with PCI standards.
Real Time Chat Application with Kotlin and Firebase
Unit testing Camel Routes with the Spock testing framework in a Spring Boot application.
Implement a GraphQL Endpoint in a Groovy App
I looked at the release notes for Spring Boot 2.0.0.M1 not expecting a lot of exciting changes but was surprised by some compelling things. There is the usual “deprecated classes are removed” and “Dependency X is upgraded” but there are some more…
Database migration in the Java-world with Flyway
MariaDB4j is an embedded Java wrapper for spinning up a MariaDB instance for local development or continuous integration testing purposes.
How to inject Spock mocks into the Spring Context during integration tests.
Apache Camel closes the JPA session after a step on the route. This has ideas on how to fix it.
Implementing a Google DataFlow Pipeline
An example Java 8 Spark application describes exactly once processing and analysis of a Kafka topic serving a (simulated) real time 911 call data stream.
Using Flyway for database migrations in Ratpack apps
Using the Spring HATEOAS API to expose more properties from the object
Using out of the box features along with a small amount of coding, you can extract a lot of metrics from your Grails applications
Adding Base URL, Basic Auth and URL Parameters Enhancements to Spring RestTemplate
An overview of new features in JUnit 5 and integrating it into a Spring Boot application written in Kotlin
Grails 2 has a plugin for Apache Camel called Routing but that plugin hasn’t been upgraded to Grails 3 yet. Luckily, Grails 3 is just Spring Boot so we can use the Camel Spring Boot component … with some caveats. After you add the Camel…
Spring Boot application that sets up a self-contained Graylog instance for event archival and analysis.
To resolve compilation warnings when using Codenarc 0.19+, look at the enhanced rules.
Something changed in Grails 3 and how datasources are configured. This post will explain what you need to do.
A workaround for the inability to mock URI-based filters in Grails.
An overview of the Kotlin programming language which keeps the good parts of Java while reducing boilerplate to promote better Object-Oriented code.
This Spring Boot example shows how you can map JPA entities to REST endpoints and embed them in the HATEOAS output via spring-data-rest and annotations.
Automatically JUnit Test DTO and Transfer Objects
Continuous delivery is the very first principle behind the Agile Manifesto, and yet it continues to plague software development teams. In this talk, David Norton will give a brief overview of continuous delivery practices and then focus on the area…
A guide to using Groovy for Spring configuration both JavaConfig and Grails style and adding Groovy configuration to web.xml using ContextLoaderListener.
How to change the server from Tomcat to something else in Grails 3s fat jar
An example of when not to use Groovys dynamic method invocation feature. Injection attack vulnerability.
Example of clustering Grails using Docker Compose and distributing data and processing within the cluster using Hazelcast.
Test pollution can be frustrating to look into, especially when the failures are sporadic. Running your tests on the same database may also lead to problems.
Spring Boot sample application using Pac4J OAuth providers and Spring Security.
Making sure spring singletons are indeed singletons.
Grails has had support for asynchronous programming for some time now but it seems to have become more well-defined in Grails 3. It has Promises, Events in GORM
Changing Hibernate mappings in a Grails application
Groovy will compile just fine in certain scenarios where no arguments are passed to a method that expects one.
Getting Grails Database Connections to Reconnect
Details a method to share Grails object marshallers across XML, JSON and HAL flavors of web services.
A quick introduction to Retrofit. Well cover the basics for how to convert any API into a type-safe Java interface using @GET, @POST, @QUERY, and @PARAM.
Create a mocked RESTful web service using Groovy, which allows users to test out the service without changing any data.
Some interactions with the browser can be tricky. This post describes a way to wait for the document to settle before continuing.
A discussion of ETag usefulness in APIs and an example project created from Spring Data RESTs built-in ETag support.
On a recent grails project using postgreSQL 9.4 that took advantage of the jsonb datatype, we ran into an issue mapping data back and forth to our domain
A compiled list of which Groovy version goes with a version of Grails.
I learned a lot building my first Ratpack application. I hope this post will help you on your way to building your first Ratpack application.
Intelligent microservice metrics with Spring Boot, Dropwizard, and Statsd
For deploying to Heroku, outlines a method using Gradle to work-around the 15 minute build timeout still leverage the advantages of building from source.
As much as we hate to admit it, from time to time there are benefits to languages that operate outside the JVM. Whether its interfacing with hardware or simply
Easily get GORM max size constraints
I came from a background of making sites with Django and after I starting going head-first into Grails, one of the things I missed was a really good and easy to make an admin section. You know — something that “just works” to do some basic CRUD…
Discussing Groovy Closures and why they are useful.
Grails and Groovy will continue to be part of our toolkit and part of our client solutions in the future.
For automated tests, a solution to reset your H2 database between each test.
Easily push your Grails assets to a S3 backed CDN with the cdn-asset-pipeline.
How to write a single Gradle task to copy multiple directories and still use up-to-date checking.
A workaround for a couple of Grails 2.x bugs and changes that have made it difficult to sort criteria case-insensitively when using child/nested properties.
Fat jar deployments in Vert.x can simplify the delivery of your software. One drawback is limited options for module dependencies, which this post will address.
A tutorial and accompanying project for creating a simple UDP server with Spring Boot and Reactor.
Using the StringTemplateEngine in Groovy -- troubleshooting, gotchas, and everything else.
Blog on creating a Grails plugin to implement HTTP compression.
Logging REST Exceptions with Spring using ResponseEntityExceptionHandler
At the 2014 GR8Conf US, Scott Hickey from Object Partners and Jim McGill from Mutual of Omaha spoke about a large mission-critical Groovy application.
Grain is a static site generator written in Groovy
Examples of testing Grails APIs with Grails Rest Client Builder, Groovy Http Builder, and Apache Http Client
Groovy has a limitation that restricts multiple assignment to simple variables. However, by using with(), we may be able to work around that.
Review of material and presentations from Gradle Summit 2014, Santa Clara, California.
Inline initialization of Java Maps is never pretty, this solution provides a type safe and efficient way to do so.
Instructions on how to run Grails commands on Heroku using an example of how to run Grails migrations on Heroku
It can take a little digging to move Spring Security + CAS XML configuration to Java. Here is the Java config equivalent to the SS documentations example.
A script to grab the list of modified files from git, parse their filenames, and pass those names for testing in grails test-app.
Explains how to resolve the Grails R14 Error when it is encountered on Heroku.
Gradle build code will sometimes need to be reused across the enterprise. Here are a few ways to do so.
Using controller filters to configure tracking and logging of Hibernate statistics in HTTP requests.
Summary of unit test mocking capabilites and syntax of Spock test framework
How to control a WeMo device using Groovy
Recap of John Engelmans presentation at the January 2014 Groovy Users of Minnesota (GUM) meeting on utilizing Spring Batch with Grails applications.
The performance of expensive calculations in Groovy can be increased with the use of memoization.
Using Groovy almost makes calling Stored Procedures an enjoyable process. See how to process Sql Output Parameters and ResultSets easily in Groovy
An example of using JNDI to provide a Grails application config values per Tomcat Host.
Implement dependency injection in Dropwizard with Google Guice.
Speed up your Grails functional tests by running them in parallel with Gradle
Describes a technique for setting up a temporary test suite while upgrading a Grails application.
How to write tests for GWT using GwtMockito. GwtMockito makes it possible for you to write Mockito unit tests for your GWT code; these tests execute a lot faster than GWTTestCase or PowerMockito tests, making your build times more scalable.
An example Grails build configuration for creating a Travis build matrix
Building a Standalone Service Tier with Spring Integration and RabbitMQ
As an advanced debugging technique, the Groovy Console is a great tool for interactively working with Java or Groovy objects serialized from running code.
Some thoughts and ideas on how I would go about my first Grails project, if I had the chance to start it over.
Create Grails domain classes from your legacy database tables.
How to build, package, and deploy applications with Ratpack
Simple setup for Grails integration tests to rollback from multiple databases when using the Datasources plugin or 2.3 built-in support.
The released of JUnit 4.4 added a new method assertThat which is a much improved way to write assertions vs the old assert methods.
How to get the benefits of type-safe page objects with the Geb functional testing framework
Discussion of Groovys Optional Typing system with benefits and drawbacks outlined.
Demonstrates using the Groovy Meta Object Protocol framework to build a custom MetaClass implementation.
Describes how to use Gradle and its Shadow plugin to create a self contained, executable Jar. No more classpath management.
A tutorial with backing github project detailing how to build custom authentication solutions with the Grails Spring Security Core plugin.
Run Quartz jobs to fire only once per cluster, not once per server, while still providing beans from the Spring managed context and using the latest version of Quartz.
A demonstration of leveraging Project Tyrus with Groovy and Spring to build a WebSocket-driven application.
Grails 1.3.x has a nasty bug if you call the render method in a controller with the wrong signature
Demonstrating the use of Groovy Categories to redefine a traditional service layer implementation.
Demonstrating the use of Groovy Categories to redefine a traditional service layer implementation.
Using final can seem like overprotectiveness to some. It is certainly misunderstood by many.
Demonstrates using Spring property placeholders to access Grails configuration directives.
An introduction to the Poly Driver plugin.
It happens sometimes that a web page isnt using UTF-8, but theres a need to display UTF-8 data. Thankfully HTML offers encoding that allows displaying any arbitrary UTF-8 characters.
When refactoring, be sure to check your application settings as they may no longer make sense.
When externalizing grails app configurations for multiple environments I want to ensure values are provided for all the required/expected properties. So I wrote a plugin to help.
Testing Examples for the Facebook SDK Grails Plugin
Compares Resource Oriented Computing to Groovy as development platforms for enterprise computing.
This details a way to create tests similar to FItnesse query fixtures using the Spock framework.
How to deal with dependency resolution changes for plugins in Grails 2.2 without the workaround, by publishing your plugins as Maven artifacts.
How to mock 3rd-party services in Grails functional tests
Introducing Maprest: A Grails Plugin for Customized and Dynamic REST Servcies
I recently encountered some Java code with what seemed to be an odd warning.
Describe how to profile a Grails application using the built-in Java VisualVM application
Make your own graphing calculator in Grails with Google Chart Tools, the Google Visualization Plugin, and exp4j
Getting started with Gradle, with examples. No installation necessary, get started quickly and painlessly with the included sample project.
Customize the way Grails generates user interfaces to get a look much closer to what you need with the fields plugin. Finally, Grails scaffolding can be useful.
Using Spring MockRestServiceServer for RestTemplate client functional and unit testing, with code samples and examples.
Using Ant Paths to enhance the Grails Resources plugin while organizing the code into modules with a common pattern.
Some impressions after using the new Eclipse Juno IDE for a few days.
This post show how to create a hierarchical test data builder using generics.
Some setup and common issues involved with unit testing controllers in Grails 1.3.7.
The Apache Tomcat v7 brings with it a feature called Parallel Deployment, which allows deploying more than one application to the same context.
Comparing writing Grails units tests using mock objects written with mockFor and Gmock.
Shows how to setup the oauth-plugin and LinkedIn API in a Grails application
How-to use the new JsonBuilder in Grails 2.0 to convert a graph of object to JSON dynamically at runtime.
If you use Mocking framework (Mockito or EasyMocK) and you want to mock final classes, this article will provide you a simple way to actually mock them.
VIM can provide some of the more advanced IDE features while still remaining lightweight. Here I discuss version control, merging and testing of a Grails application.
VIM can be used as your primary editor for Grails. Here I walk through navigation of a Grails project using various VIM plugins and scripts.
Quick and Easy Class and Sequence Diagrams in Eclipse
A blog post detailing how to add a JEE war module to an existing gradle project. Also shows how to run it with jetty via gradle.
how to get started with building java projects using the gradle build system.
A RegexParserDecorator to decorate any Spring Formatter to apply a regex pattern, creating a @StrictDateTimeFormat annotation as an example.
Grails 2.0 is here and full of a bunch of exciting, fun stuff. Check out Sr. Consultant Zan Thrash talk about what youll see in Grails 2.0.
The Grails JXL Plugin can be used to generate Excel documents from a Grails application using the JXL library
Steps taken to isolate a thread deadlock issue that leads outside the application code into the JVM and OS.
Latest features with the new release of Grails
Introduction to UMLet; a free simple tool for creating UML diagrams from the stand alone app or from Eclipse with the plugin.
Compares the performance of the various thread synchronization mechanisms provided by Java.
This is from a guest lecture that I delivered to a web-programming class at Bethel University this past month.
Just last week the Eclipse group released a service release to their Indigo version, including support for Java 7.
Grails gives you the option of overriding the HTTP method via an extra parameter(_method) or a custom HTTP Header(X-HTTP-Method-Override).
A quick peek at some of the new bits in the new Java version 7 from Oracle.
An example of implementing REST authentication by signing the URL.
The Spring Security UI plugin is an extension to the core plugin. This article focuses on customizing the forgot password screens and functionality.
A simple way to add fine-grained security to a Grails application: use annotations and a web filter.
Examples on how to use some of the MyBatis annotations and Spring.
Object Partners is proud to be the premier sponsor of this years GR8 in the US Conference. The conference, dedicated to Groovy, Grails, Griffon and other GR8 technologies is now open for registration at <a href=http://gr8conf.us>gr8conf.us</a>.
Recently developers of the continuous integration tool, Hudson, have created a new project, Jenkins.
With the latest STS and Grails, Eclipse becomes a potential contender in creating and maintaining Grails applications.
Developer Testing Unit Testing Grails Domain and Command constraints
Gradle is a powerful build tool that can be used as a replacement for Ant. This article describes the benefits of moving to Gradle and a simple way to do so.
Insert BLOB Data into HSQLDB via ANT Groovy plugin for JUnit testing
Have you ever been on a grails/groovy project that failed because of * limitations/faults in the technology itself * the grails/groovy learning curve Colin Harrington, a Senior Consultant at Object Partners, responds to a common question that we hear based on his years of experience.
Recently Ive been asked how do you get started writing unit tests? I had to give great thought to the question. A lot of us have been writing unit tests for a long time, most using JUnit or a similar suite, so to many of us its kind of second nature. After pondering and chatting more, heres what I came up with.
Version 3.0.5 of the Spring framework and 3.6.0 of the Hibernate framework have been released
Wiring up a Grails application to use Springs Interceptors with Annotations
Writing Java JUnit unit-tests for your JPA/Hibernate persistence-tier code leveraging a memory resident database, HSQLDB.
Overview of benefits of using Grails and Groovy on web development projects.
Overview of how to use Spring AOP Interceptors and DailyRollingFileAppender in your Grails Project
Theres no excuse for not cleaning up when making code changes. A simple rule to follow is that there should be no compiler warnings in your code!
Yesterday I overheard a couple co-workers talking about this cool script they found for quickly switching between development projects. Turns out they were talking about my old post so I thought I’d share the latest version of the script. Back in…
Using the powerful task-focused interface provided in Eclipse, project and application lifecycle management can be eased.
There are times where it’s not practical (or possible) to wire up your entire application into the Spring framework, but you still need a Spring loaded bean in order to perform a task. JSP tags and legacy code are two such examples. Here is a…
Integrate OpenSSO/OpenAM with Liferay Portal on Tomcat to achieve single-signon.
A simple oversight in the documentation and potentially unnecessary default in the Spring @PathVariable annotation can cause runtime trouble.
A quick trip through some examples of how to define, find, and ultimately use annotations to get work done on diverse classes.
The Mac has some nice tools to turn your jar file into a first class Mac application. This is most useful if the application has a GUI interface; Swing, SWT, etc. There are three parts to this process: Package your application as a jar file Create an…
A quick-fix to get Eclipse running again after an automatic update makes the Sun JVM again undetectable.
Spring released version 3.0.3 of the Spring Framework
On June 23rd, Eclipse launched their new release (v3.6), named Helios. Heres (good) impressions after playing with it for about ten minutes.
pre { border: solid 1px black; font-size: 1.3 em; color: black; margin: 10px; padding:10px; background: #CCCCCC; } Using Groovy on Google App Engine is relatively simple due to Groovy’s compatibility with Java. However, until recently, the…
Configuring variables outside of a WAR file for use with each instance deployed.
Suppress cant find JAR warnings generated by javac when running in Ant.
How to interpret and use the test results for Canoo Webtest, particularly when tests dont pass or you dont even get the report screen.
For those with Spring projects already in progress, as well as those starting new projects, a number of new features are available, and some changes must be made to take advantage of them.
Overview It is commonplace in enterprise applications to allow application properties to be loaded from configuration files. When leveraging Spring, this is typically achieved using a PropertyPlaceholderConfigurer instance within the application…
Apache Camel’s SEDA (Staged Event-Driven Architecture) endpoints (http://camel.apache.org/seda.html) provide a useful and quick mechanism to implement asynchronous, event-driven processing within your applications. See http://www.eecs.harvard.edu/~mdw/proj/seda/ for the original description of the SEDA architecture. For those not very familiar with Camel, implementing a SEDA route can be as simple as adding the following to a route builder class:
A brief explanation of the Groovy spaceship operator, its usage, and the advantages of using it.
Using immutable data structures to minimize complexity and risk in concurrent applications.
Using both JPA and JAXB annotations on the same member of an object can cause runtime errors if not done correctly. Heres how to do it.
A step-by-step approach to get Hudson Continuous Integration working behind an Apache web server, building an Ant project fetched from Subversion.
Exactly how is your development environment configured? I solved this problem with a simple script...
Really fast and easy to try different versions of things that are wired into the command line path. For example, switching grails versions is as simple as...
At my current client, we are writing an application that is deployed as an ear into Websphere. One of the goals of the project is to write out-of-container tests so that we dont have to build and deploy over and over again. Two of the tools we are using in this application is JPA for the ORM and Spring. Initially, we had two persistance.xml files, one for production and one for testing. Some of the differences were that the production version used a transaction type of JTA and the test version used resource local. There were a few other property differences, but otherwise they needed to be identical. At first this was ok, but as our list of classes and properties grew it became a maintenance hassle.
A good mocking framework is a must have in any Java developers toolset. Mocking frameworks greatly reduce the amount of code needed to effectively mock dependent interfaces and/or classes. Over the past several years EasyMock has been my mocking…
Moving to Mac OS X as a development environment and some issues or differences discovered.
Keyword expansion is not the default for files added to an SVN repository. And it’s done on a per file basis (with CVS we could configure an entire repository to turn on keyword expansion — .) Some svn tools and plugins allow for defaulting…
In my previous three posts, I described my experience with maintenance, refactoring, and installation on a large project that used both Java and Groovy. In this post, I will discuss the “support nightmare” raised by Bill Burke in his blog post…
In my previous two posts, I described my experience with maintenance and refactoring on a large project that used both Java and Groovy. In this post, I will discuss the installation concerns raised by Bill Burke in his blog post “Polyglot…
In part 1, I described how my experiences using both Groovy and Java delivered business value to the customer by letting the project team work with code that closely reflected the domain. We found the new system didn’t result in a “maintenance…
My answer to Peter Ledbrooks’s blog post “Are polyglot systems a good idea?” is “Yes!“. He wrote his post after reading “Polyglotism is the worst idea I ever heard ” by Bill Burke. I don’t know Bill Burke personally but the post has a troll-like…
This is a follow on to Eclipse Setup for Grails 1.1 Development . Although not ideal Eclipse integration, by setting up a Run Configuration for your Grails project in Eclipse, you will be able to run and debug Grails integration JUnit tests within…
Overall I have enjoyed the development experience with Grails and I am excited about its future. I am a heavy Eclipse user so along with a number of folks in the community I have been a bit disappointed with the support in my favorite IDE. However…
One frequent hole in Test Driven Development (or any other comprehensive attempt to test) in Java web applications is the presentation layer. Especially when using an MVC pattern to separate the work from the display, the trend is to do that testing…
For the past several weeks, I’ve been working on a Grails app in my spare time, and I’m really excited about the future of Grails. However, I’ve been a bit disappointed in the tooling currently available. Myself and many of my clients use Eclipse…
At my current client, there’s a drive to put more unit tests on the Java code. It’s been a long hard process as few of the developers do strict, or even just “mostly,” test-driven development. As an attempt to try and drive this home, they’ve also…
It happens far too often that developers shortcut creating and in their objects. This discussion hopes to enlighten those short-cutters, and introduce a simple solution to their problem. The use of and is assumptive of only one concern, and…