naming cleanup

This commit is contained in:
eugenp 2016-01-25 00:55:53 +02:00
parent bec77d6a89
commit 2e5b1ac48d
4 changed files with 12 additions and 5 deletions

View File

@ -1,14 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beansProjectDescription>
<version>1</version>
<pluginVersion><![CDATA[3.2.0.201303060654-RELEASE]]></pluginVersion>
<pluginVersion><![CDATA[3.7.2.201511260958-RELEASE]]></pluginVersion>
<configSuffixes>
<configSuffix><![CDATA[xml]]></configSuffix>
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/webapp/WEB-INF/api-servlet.xml</config>
<config>java:org.baeldung.spring.SecurityWithoutCsrfConfig</config>
</configs>
<autoconfigs>
<config>java:org.baeldung.spring.Application</config>
</autoconfigs>
<configSets>
</configSets>
</beansProjectDescription>

View File

@ -17,12 +17,12 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
// @ImportResource({ "classpath:webSecurityConfig.xml" })
public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
public class SecurityWithoutCsrfConfig extends WebSecurityConfigurerAdapter {
@Autowired
private CustomAccessDeniedHandler accessDeniedHandler;
public SecSecurityConfig() {
public SecurityWithoutCsrfConfig() {
super();
}

View File

@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class CsrfAbstractIntegrationTest {
@Autowired
private WebApplicationContext context;
@ -30,6 +31,8 @@ public class CsrfAbstractIntegrationTest {
protected MockMvc mvc;
//
@Before
public void setup() {
mvc = MockMvcBuilders.webAppContextSetup(context).addFilters(springSecurityFilterChain).build();

View File

@ -4,13 +4,13 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.spring.PersistenceConfig;
import org.baeldung.spring.SecSecurityConfig;
import org.baeldung.spring.SecurityWithoutCsrfConfig;
import org.baeldung.spring.WebConfig;
import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.test.context.ContextConfiguration;
@ContextConfiguration(classes = { SecSecurityConfig.class, PersistenceConfig.class, WebConfig.class })
@ContextConfiguration(classes = { SecurityWithoutCsrfConfig.class, PersistenceConfig.class, WebConfig.class })
public class CsrfDisabledIntegrationTest extends CsrfAbstractIntegrationTest {
@Test