CopyPastor

Detecting plagiarism made easy.

Score: 0.844015960109268; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-12-28
by Sagar P. Ghagare

Original Post

Original - Posted on 2017-02-17
by EliuX



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I was facing the same issues and solved it the following way:
1. Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter { private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/" }; @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**") .addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS); } }
In addition you must put your css or styles folder into your *src/main/resources/(static|public|resources|META-INF/resources)* folder
2. Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) throws Exception { //Web resources web.ignoring().antMatchers("/css/**"); web.ignoring().antMatchers("/scripts/**"); web.ignoring().antMatchers("/images/**"); } }
I was facing the same issues and solved it the following way:
1. Make sure the folder you are exporting is available to the web
public class WebMvcConfig extends WebMvcConfigurerAdapter { private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/" }; @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**") .addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS); } }
In addition you must put your **css** or **styles** folder into your *src/main/resources/*(*static*|*public*|*resources*|*META-INF/resources*) folder
1. Make sure your security policies don't block them
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override public void configure(WebSecurity web) throws Exception { //Web resources web.ignoring().antMatchers("/css/**"); web.ignoring().antMatchers("/scripts/**"); web.ignoring().antMatchers("/images/**"); } }
That should be enough


        
Present in both answers; Present only in the new answer; Present only in the old answer;