Skip to content

Instantly share code, notes, and snippets.

@SergiiVlasiuk
Last active July 11, 2018 15:10
Show Gist options
  • Save SergiiVlasiuk/7cff77bc4435dc07de979b3879d29775 to your computer and use it in GitHub Desktop.
Save SergiiVlasiuk/7cff77bc4435dc07de979b3879d29775 to your computer and use it in GitHub Desktop.
Change spring security multithread strategy
@Import( {WebConfiguration.class, SwaggerConfiguration.class, AuthorizationConfiguration.class,
DataSourceConfiguration.class})
@EnableJpaAuditing
public class MainConfiguration {
@PostConstruct
void init() {
TimeZone.setDefault(TimeZone.getTimeZone(Constants.DEFAULT_TIME_ZONE_ID));
SecurityContextHolder.setStrategyName(MODE_INHERITABLETHREADLOCAL);
}
// ....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment