Skip to content

Instantly share code, notes, and snippets.

@SimonHarmonicMinor
Created May 7, 2020 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimonHarmonicMinor/1e93c249e70ea7202c81ea59899eb3a1 to your computer and use it in GitHub Desktop.
Save SimonHarmonicMinor/1e93c249e70ea7202c81ea59899eb3a1 to your computer and use it in GitHub Desktop.
@Component
class ParentService {
...
@Autowired
public void setChildService(ChildService childService) {
this.childService = childService;
}
}
@Component
class MyService {
private ParentService parentService;
...
public void corruptTheRuntime() {
parentService.setChildService(null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment