Skip to content

Commit

Permalink
Merge pull request #1 from tek-mayo-jaguar/develop
Browse files Browse the repository at this point in the history
Inject Spring environment to get access to project properties file
  • Loading branch information
choonchernlim committed Apr 13, 2016
2 parents 1ca4a01 + d60ce37 commit e01d0c3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.MethodInvokingFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
Expand Down Expand Up @@ -70,6 +71,8 @@
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.util.Timer;

/**
Expand All @@ -78,6 +81,9 @@
*/
public abstract class SAMLWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {

@Inject
protected Environment env;

@Autowired
private SAMLAuthenticationProvider samlAuthenticationProvider;

Expand Down Expand Up @@ -297,7 +303,7 @@ public Protocol protocol() {
}

// Configure TLSProtocolConfigurer
@Bean
@PostConstruct
public MethodInvokingFactoryBean socketFactoryInitialization() {
MethodInvokingFactoryBean methodInvokingFactoryBean = new MethodInvokingFactoryBean();
methodInvokingFactoryBean.setTargetClass(Protocol.class);
Expand Down

0 comments on commit e01d0c3

Please sign in to comment.