Formatted code

This commit is contained in:
Tarun Jain 2020-09-15 20:32:07 +05:30
parent 4526309cf2
commit 51c2e22324
2 changed files with 19 additions and 19 deletions

View File

@ -9,19 +9,19 @@ import org.springframework.web.filter.CharacterEncodingFilter;
@SpringBootApplication
public class CharacterEncodingDemo {
public static void main(String[] args) {
SpringApplication.run(CharacterEncodingDemo.class, args);
}
public static void main(String[] args) {
SpringApplication.run(CharacterEncodingDemo.class, args);
}
@Bean
public FilterRegistrationBean filterRegistrationBean() {
CharacterEncodingFilter filter = new CharacterEncodingFilter();
filter.setEncoding("UTF-8");
filter.setForceEncoding(true);
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(filter);
registrationBean.addUrlPatterns("/*");
return registrationBean;
}
@Bean
public FilterRegistrationBean filterRegistrationBean() {
CharacterEncodingFilter filter = new CharacterEncodingFilter();
filter.setEncoding("UTF-8");
filter.setForceEncoding(true);
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(filter);
registrationBean.addUrlPatterns("/*");
return registrationBean;
}
}

View File

@ -5,9 +5,9 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class CharEncodingCheckController {
@GetMapping("/ping")
public String ping() {
return "path";
}
@GetMapping("/ping")
public String ping() {
return "path";
}
}