Spring 3 Annotations

Posted by jboyd on Stack Overflow See other posts from Stack Overflow or by jboyd
Published on 2010-05-26T20:57:51Z Indexed on 2010/05/26 21:01 UTC
Read the original article Hit count: 367

Filed under:
|
|

I can't get spring annotations to work at all, I'm just trying to get the simplest thing to work...

.../mycontext/something -> invokes method:

@RequestMapping(value = "/something")
@ResponseBody
public String helloWorld() {
    System.out.println("hello world");
    return "Hello World";
}

My main problem is no matter how hard I try, I can't find a complete SIMPLE example of the configuration files needed, every spring tutorial is filled with junk, I just one one controller to handle a request with a mapping and can't get it to work

does anyone know of a simple and complete spring example. pet-clinic is no good, it's way too complicated, I have a tiny basic use case and it's proving to be a real pain to get working (this always happens with Spring)

© Stack Overflow or respective owner

Related posts about java

Related posts about spring-mvc