Tag Archives: Spring

Sawing through the Java Loggers

Sawing through the Java Loggers I know what your thinking, “It’s just logging!”. This small, yet common part of our applications, provides developers, QA and troubleshooters with information to help in determining code execution sequences, inspecting data values and trouble … Continue reading

Posted in Jakarta Commons Logging, Java Util Logging, LogBack, Logging, SLF4J | Tagged , , , , , | 4 Comments

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 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

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

Configuring Spring Roo for Java 7

When creating a Roo project with the “project” command, we have the option to specify the Java Version $ roo roo> project –topLevelPackage com.gordondickens.myproj –java 6 –projectName testapp If we choose Java 7 with Roo 1.2.1, the code will not … Continue reading

Posted in AOP, AspectJ, Java, Java 7, JDK7, Maven, Roo, Spring, Spring AOP, Spring Data, Spring MVC | Tagged , , , , , , | 1 Comment

Unit Testing Spring with Mockito & PowerMock

Unit Testing Spring with Mockito & PowerMock I’ve updated my Spring Mockito Demo app that I demonstrate when teaching with a PowerMock of a final class with a static method. Demo Features Maven 3.0 Maven Enforcer plugin restricting use of … Continue reading

Posted in LogBack, Logging, Maven, Mocking, Mockito, PowerMock, SLF4J, Spring Framework, Spring MVC, Testing | Tagged , , , , , , , , | Leave a comment