spring/spring_imagemagick/src/main/java/org/cloudfoundry/imagemagick/HomeController.java
@RequestMapping(value = "/", method = RequestMethod.GET)
	public String home(Model model) {

		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
		String path = classLoader.getResource("imagemagick.jpg").getPath();

		if (magickProcesser.resize(path, "100x100")) {
			// Resize was successful
			String newSize = magickProcesser.getSize(path);

			if (new String("100x100").equals(newSize)) {
				model.addAttribute("message", "hello from imagemagick");
			}
		}

		return "home";
	}
/**
	 * Simply selects the home view to render by returning its name.
	 */
Simply selects the home view to render by returning its name.
Simply selects the home view to render by returning its name .
@RequestMapping(value = "/", method = RequestMethod.GET)
	public String home(Model model) {
		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
		String path = classLoader.getResource("imagemagick.jpg").getPath();
		if (magickProcesser.resize(path, "100x100")) {
			String newSize = magickProcesser.getSize(path);
			if (new String("100x100").equals(newSize)) {
				model.addAttribute("message", "hello from imagemagick");
			}
		}
		return "home";
	}
@ RequestMapping ( value = "/" , method = RequestMethod . GET ) public String home ( Model model ) { ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; String path = classLoader . getResource ( "imagemagick.jpg" ) . getPath ( ) ; if ( magickProcesser . resize ( path , "100x100" ) ) { String newSize = magickProcesser . getSize ( path ) ; if ( new String ( "100x100" ) . equals ( newSize ) ) { model . addAttribute ( "message" , "hello from imagemagick" ) ; } } return "home" ; }
Simply selects the home view to render by returning its name.
Simply selects the home view to render by returning its name .
// Resize was successful