Spring file upload goes to Access denied page

Spring file upload goes to Access denied page

When Spring security is enabled, when I upload a file using multipart, SpringSecurity redirects me to Access denied url.

Refer to https://stackoverflow.com/questions/28225359/file-upload-spring-security
I amend my Initializer as follows!


@EnableScheduling
@EnableAsync
public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer{
@Override
protected void beforeSpringSecurityFilterChain(ServletContext servletContext) {
insertFilters(servletContext, new MultipartFilter());
}
}

This error disappears. I landed in another problem. I’m resolving it now!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s