Category Archives: Spring

Database Configuration with Spring 3.2 Environment Profiles

Database Configuration with Spring 3.2 Environment Profiles This is a followup to my previous blog Spring 3.1 Environment Profiles Let’s demonstrate how to configure an application to use different databases based on configuration. The code below is using Spring JavaConfig, … Continue reading

Posted in Annotations, Java, JUnit, Spring, Spring Data, Testing | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Enterprise Spring Best Practices – Part 4 – Annotation Config

Enterprise Spring Best Practices Series In part 4, Spring Annotation Configuration. In this edition of Enterprise Spring Best Practices, let’s look at annotations. Several of the annotations became available in Spring 2.5. Spring 3.0 added convenient annotation discovery mechanisms which … Continue reading

Posted in Spring | Tagged , , , , , | Leave a comment

Enterprise Spring Framework Best Practices – Part 3 – XML Config

Enterprise Spring Best Practices Series In part 3, Spring XML Configuration. The best thing about Spring is that there are several way to solve a problem, the worst thing about Spring is that there are several ways to solve a … Continue reading

Posted in Java Util Logging, SLF4J, Spring | Tagged , , , , , , , | 5 Comments

Enterprise Spring Best Practices – Part 2 – Application Architecture

Our application components break down into two fundamental categories, the System and Problem Domains. System Domain – infrastructure components, the plumbing, this is Spring’s sweet spot! Problem Domain – business components, typically use-case driven, this is what most of developers … Continue reading

Posted in Spring, Spring Framework | Tagged , , , , | 3 Comments

Enterprise Spring Best Practices – Part 1 – Project Config

Enterprise Spring Best Practices Series In part 1, let’s review project structure and configuration. Sections Project Directories Project Dependencies Smart Logging Running with Jetty and Tomcat Spring Configuration Files Complete Maven Config Valuable Maven Commands Further Reading Social Me Project … Continue reading

Posted in Eclipse, Jakarta Commons Logging, Java, Java Util Logging, Jetty, Log4J, LogBack, Logging, Maven, SLF4J, Spring, Spring Framework, Spring MVC, STS, Testing, Tomcat | Tagged , , , , , , | 10 Comments

Gemini Blueprint – Converting from Spring OSGi

Eclipse Virgo OSGi Enthusiasts, like myself, can now switch from the Spring OSGi namespace to the Eclipse Gemini Blueprint namespaces for bundles. Maven Dependencies <!– Gemini Blueprint OSGi –> <properties> <gemini.blueprint.version>1.0.0.RELEASE</gemini.blueprint.version> </properties> … <dependency> <groupId>org.eclipse.gemini</groupId> <artifactId>org.eclipse.gemini.blueprint.extender</artifactId> <version>${gemini.blueprint.version}</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> … Continue reading

Posted in Blueprint, Eclipse, Gemini, Java, OSGi, Spring, Virgo | Tagged , , , , , , | Leave a comment

SpringSource Tool Suite FAQ

Eclipse is one of the most popular IDEs for Java & Spring application development. Spring has developed the Spring IDE plugin providing developers with Spring aware tooling for our projects. SpringSource Tool Suite = {    Eclipse + SpringIDE + M2Eclipse … Continue reading

Posted in Grails, Java, OSGi, Roo, Spring, Spring Batch, Spring Framework, Spring Integration, Spring Roo | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Spring 3.1 Constructor Namespace

Spring Namespaces Spring provides several namespaces to simplify XML configuration, such as jdbc, tx, aop, etc. We Spring developers are already familiar with the required beans namespace. <beans> <bean id=”dataSource” class=”…”/> <bean id=”messagingProvider” class=”…”/> </beans> Spring Namespaces are defined at … Continue reading

Posted in Spring, Spring Framework | Tagged , , , , | Leave a comment

Spring 3.1 Environment Profiles

Spring 3.1 Environment Profiles Profiles Spring 3.1 now includes support for the long awaited environment aware feature called profiles. Now we can activate profiles in our application, which allows us to define beans by deployment regions, such as “dev”, “qa”, … Continue reading

Posted in JUnit, Spring, Spring Framework, Testing | Tagged , , , , , | 3 Comments

What is in my Cloud Environment?

I put together Java sample applications using Spring 3.1. Using Spring’s Environment abstractions, we can gather details about the underlying platform. See the following sample pages Jelastic: http://petclinic.jelastic.servint.net/clinic/environment Heroku: http://evening-window-9861.herokuapp.com/environment CloudBees: http://roobees.gdickens.cloudbees.net/environment Environment Bean package com.gordondickens.roobees.util; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; … Continue reading

Posted in Cloud, CloudBees, Heroku, Jelastic, Spring, Spring Roo | Tagged , , , , , , , | Leave a comment