ru.concerteza.springtomcat.etomcat6.x509.SecuredService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etomcat6-test Show documentation
Show all versions of etomcat6-test Show documentation
Tests for Apache Tomcat 6 embedded into Springframework context
package ru.concerteza.springtomcat.etomcat6.x509;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;
import javax.annotation.security.RolesAllowed;
/**
* User: alexey
* Date: 3/4/12
*/
public interface SecuredService {
public static final String GREETING = "Hello ETomcat Client!";
String hello();
String fail();
}
@Service
class SecuredServiceImpl implements SecuredService {
@RolesAllowed("ROLE_ETOMCAT_CLIENT")
public String hello() {
return GREETING;
}
@RolesAllowed("ROLE_FAIL")
public String fail() {
return "Access failed";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy