Skip to Content
Java 9 Dependency Injection
book

Java 9 Dependency Injection

by Nilang Patel, Krunal Patel
April 2018
Intermediate to advanced content levelIntermediate to advanced
246 pages
6h 11m
English
Packt Publishing
Content preview from Java 9 Dependency Injection

Causes and solutions

As we have already seen, circular dependency mostly occurs as a result of bad design/coding practice. In large software application development, the coders may deviate from the context and produce a circular reference.

To overcome this, you can take the help of various tools to find unwanted circular dependencies. This should be an ongoing activity and be applied from the beginning of the development cycle. For example, Eclipse has a plugin called Java Dependency Viewer, which will help to see the dependency between classes and Java packages. 

Issues of circular dependency can be addressed by following certain patterns and principles, which are discussed in the following sections.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro CDI 2 in Java EE 8: An In-Depth Guide to Context and Dependency Injection

Pro CDI 2 in Java EE 8: An In-Depth Guide to Context and Dependency Injection

Jan Beernink, Arjan Tijms
Dependency Injection

Dependency Injection

Dhananjay Prasanna

Publisher Resources

ISBN: 9781788296250Supplemental Content