Skip to main content

Good Stub from other sites :

Spring+Hibernate Application with zero XML
Spring framework came up with Annotation support since 2.5 version which eases the 
development. Whether Annotation based approach better or XML approach is better is 
depends on the project and their personal preference.

This is very good example for zero xml.

- See more at: http://www.sivalabs.in/2011/02/springhibernate-application-with-zero.html#sthash.G1pYeuBl.dpuf



Comments

Popular posts from this blog

Replace Non ASCII Characters in a File

Replace Non ASCII Characters in a File ? package com.pukhraj.blog; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; public class ReplaceNonAsciiCharacters {     public static void main(String args[]) {         String inputFileName = "D:/input_file_name.txt";         String outputFileName = "D:/output_file_name.txt";         try {         // Read the content from the input file using BufferedReader object.             BufferedReader in = new BufferedReader(new FileReader(inputFileName));                         // Write the content to the output file using BufferedWriter object.             BufferedWriter out = new BufferedWriter(new FileWriter(outputFileName));         ...
How to check a string starts with numeric number? String str = "123abcd"; boolean isStartWithDigit = Character.isDigit(s.charAt(0)); System.out.println("isStartWithDigit: "+isStartWithDigit); How to get first numeric value from a string in java?  Matcher matcher = Pattern.compile("\\d+").matcher(titleStr); if(matcher.find()) { System.out.println(matcher.group()); }; How to check if a String contains another String in a case insensitive manner in Java? Solution 1: String str = "I am Java Developer"; String test = "java"; Boolean bool = str.toLowerCase().contains(test.toLowerCase()); System.out.println(bool); Solution 2: org.apache.commons.lang3.StringUtils.containsIgnoreCase("AbBaCca", "bac"); Solution 3: Pattern.compile(Pattern.quote(s2), Pattern.CASE_INSENSITIVE).matcher(s1).find();