View RSS Feed

Spring 3

Spring 3

  1. Configuring Data Sources in Spring

    by , 11-27-2011 at 09:51 PM
    Spring offers a number of options for configuring a data sources via data source beans. These sources include the following:
    • Data sources that use JNDI
    • Data sources that use JDBC drivers
    • Data sources that pool connections


    There is significant differences in the features available depending on what you are trying to do. In this tip, I will outline how to configure different data sources and what they are best used for.

    If you are looking to do really robust ...
  2. Reduce your Spring XML using Java Configuration

    by , 11-27-2011 at 09:47 PM
    As Spring has grown so has the need to configure more and more components leading to the xml configuration files growing larger and larger. In order to address this issue, the Java configuration project was started as a standalone project at SpringSource and developed over the years. It was finally integrated into the core Spring framework in version 3.0. Now you are able to use a powerful ApplicationContext configuration abstraction that has the same level of isolation as its XML cousin. In this ...
  3. Internationalization with Spring

    by , 11-27-2011 at 09:43 PM
    Often it is necessary for an application to be able to support several languages in order to address the requirements of customers located in different countries. For this java has support for what is called internationalization (i18n) that allows allows for an application to resolve text messages for different locales. The means of doing this in Java is to use what is called a ResourceBundle. These are property files that contain a key/message pair and have a special naming convention for the file ...
  4. How to Automatically Discover Spring Beans on the Classpath

    by , 11-27-2011 at 09:38 PM
    Since itís appearance in Java 5, annotations has helped to simplify the configuration of application through component scanning. This removes the need for XML bean tags in many cases. Classes annotated as component stereotypes including the following: @Service, @Controller, @Configuration, @Component, @Repository as well as the JSR-330 annotations, such as @Named are included in the auto-scan default filter. Once auto-detected, these components become Spring beans and are automatically placed ...
  5. Using Spring Data Access Support with Hibernate

    by , 11-27-2011 at 09:35 PM
    In our previous tip, I gave an introduction to Springís persistence technology agnostic approach to data access. In this tip, we will show you how to use Spring with one of the most popular persistence technologies, Hibernate. Hibernate is an open source persistence framework that is one of the most successful persistence frameworks in the developer community. The reason for this is that it is a full featured object relational mapping (ORM) tool. It provides all the features youíd expect from a ...
  6. Introduction to Spring Expression Language

    by , 11-16-2011 at 04:42 PM
    Up until now, in the tips Iíve shown, all the constructor arguments and bean properties have been statically wired in the Spring configuration XML. What this means is that any definition you make has to be provided during development. This also applies to other beans which need to be defined statically in the Spring configuration.

    In Spring 3, the Spring Expression Language (SpEL) was introduced as a powerful and concise means of dynamically wiring values in constructor arguments ...
Page 2 of 2 FirstFirst 12