I am finding a way as how can i use spring validation for the method parameters.
something like this
Code:
@NotNull("name" length=50)
@NotNull("desc" length=100)
@NotNull("path")
public MyObject create (String name, String desc, String path)
            throws ServiceException {
 // some code
}
But i am not able to figure out how the validation will happen and how can i throw my custom exception with the proper error code.

Pls suggest ..

Thanks