Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OZ-657: Make scanBasePackages configurable #37

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/com/ozonehis/eip/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication(scanBasePackages = {"org.openmrs.eip, com.ozonehis.eip"})
@SpringBootApplication(scanBasePackages = "com.ozonehis.eip.*, ${eip.app.scan.packages}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try this

@SpringBootApplication(scanBasePackages = {"com.ozonehis.eip.*", "${eip.app.scan.packages}"})

public class Application {

public static void main(final String[] args) {
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/resources/eip-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ camel.springboot.main-run-controller=true
# Camel context name
camel.springboot.name=${spring.application.name}
# ----------------------------------------------------------------------------------------------------------------------

## --- EIP Client Configuration ----------------------------------------------------------------------------------------
# This is a comma-separated list of packages to scan for EIP classes (components, routes, etc.)
# Default is org.openmrs.eip.* which will scan all packages under org.openmrs.eip. However, you can specify a more
eip.app.scan.packages=org.openmrs.eip.*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds default as to not break existing projects(e.g eip-odoo-openmrs). I believe this should configured from the respective route project.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is org.openmrs.eip.* optional because not all users need the core EIP entities? And are there mandatory entity classes in com.ozonehis.eip.*?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is org.openmrs.eip.* optional because not all users need the core EIP entities?

Yes, it's optional. For example demo service and EIP Keycloak Superset.

And are there mandatory entity classes in com.ozonehis.eip.*

Currently, all routes projects within Ozone uses com.ozonehis.eip.* as the base package. Plus other common utils bean e.g ShutdownHandler

corneliouzbett marked this conversation as resolved.
Show resolved Hide resolved
# ----------------------------------------------------------------------------------------------------------------------