This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProxyUtils { | |
@SuppressWarnings({ "unchecked" }) | |
public <T> T getTargetObject(Object proxy) throws Exception { | |
while ((AopUtils.isJdkDynamicProxy(proxy))) { | |
return (T) getTargetObject(((Advised) proxy).getTargetSource().getTarget()); | |
} | |
return (T) proxy; // expected to be cglib proxy then, which is simply a | |
// specialized class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.falconcis.gist; | |
import javax.sql.DataSource; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; | |
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; | |
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.falconcis.gist | |
import java.util.List; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.web.PageableHandlerMethodArgumentResolver; | |
import org.springframework.web.method.support.HandlerMethodArgumentResolver; | |
import org.springframework.web.servlet.config.annotation.EnableWebMvc; |