Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. Field filed = GenericApplicationContext.class.getDeclaredField("refreshed");
  2. filed.setAccessible(true);
  3. filed.get(((GenericApplicationContext) context))).set(false);
  4. Stream.of(refreshableBeans).forEach(t -> context.getDefaultListableBeanFactory().destroySingleton(t));
  5. context.refresh();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement