repo1.maven.org$maven2@org.springframework$spring-core@2.5.6
repo1.maven.org$maven2@org.springframework$spring-core@2.5.6@org$springframework$core$ParameterNameDiscoverer.java
file
oh
o
[]
It's not clear for me what is the difference in spring security between :
@PreAuthorize("hasRole('ROLE_USER')")
public void create(Contact contact)
And
@Secured("ROLE_USER")
public void create(Contact contact)
I understand PreAuthorize can work with spring el but in my sample, is there a real difference ?
In Java6, imagine I have the following method signature:
public void makeSandwich(Bread slice1, Bread slice2, List<Filling> fillings, boolean mustard)
I would like to know, at runtime, the value that was passed on to slice2 or any other parameter, the important bit here is that I want to get the value by parameter name.
I know how to get the list of parameter types with getParameterTy...
In Spring, the two following statements are, if I'm not mistaken, identical:
@RequestParam("type") String type
@RequestParam String type
How can spring know the variable name of 'type' (second version). I was under the impression
that this information was removed from the class files unless compiled with
the -g flag (include debug information).
I am considering using Spring Security annotations for my application, with the EL (expression language) feature. For example:
@PreAuthorize("hasPermission(#contact, 'admin')")
public void deletePermission(Contact contact, Sid recipient, Permission permission);
I need the EL capability because I have built my own ACL implementation. However, to use this capability with the "#contact" type ...
package org.springframework.core;
Interface to discover parameter names for methods and constructors.
Parameter name discovery is not always possible, but various strategies are
available to try, such as looking for debug information that may have been
emitted at compile time, and looking for argname annotation values optionally
accompanying AspectJ annotated methods.
- Author(s):
- Rod Johnson
- Adrian Colyer
- Since:
- 2.0
Return parameter names for this method,
or
null if they cannot be determined.
- Parameters:
method method to find parameter names for- Returns:
- an array of parameter names if the names can be resolved,
or
null if they cannot
Return parameter names for this constructor,
or
null if they cannot be determined.
- Parameters:
ctor constructor to find parameter names for- Returns:
- an array of parameter names if the names can be resolved,
or
null if they cannot