No. Profiles affect only bean creation, not method. So you either create the whole controller or no.
Your options:
1) Create a controller with the methods that have to be available only for the given profile.
2) If you don't want to create a dedicated controller for the given method that has to be created only for a given profile you can programmatically check the active profiles and return 404 or whatever you want.
@Autowired
Environment environment;
public boolean isMyProfileActive() {
for (final String profileName : environment.getActiveProfiles()) {
if("mySpecificProfile".equals(profileName)) return true;
}
return false;
}
@RequestMapping(...)
public ResponseEntity<?> myMethod(){
if(isMyProfileActive()) return new ResponseEntity(HttpStatus.NOT_FOUND);
//the rest of the code for the method
}