Skip to content

Commit

Permalink
refactor(servlet): remove hardcoded package name (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu authored Jul 13, 2024
2 parents 73c2b66 + db4e2fc commit 2b87789
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void createJpaSchemaExport() {
// Scan for classes annotated as JPA @Entity
ClassPathScanningCandidateComponentProvider entityScanner = new ClassPathScanningCandidateComponentProvider(true);
entityScanner.addIncludeFilter(new AnnotationTypeFilter(Entity.class));
for (BeanDefinition beanDefinition : entityScanner.findCandidateComponents("ai.elimu.model")) {
for (BeanDefinition beanDefinition : entityScanner.findCandidateComponents(ai.elimu.model.BaseEntity.class.getPackageName())) {
logger.info("beanDefinition.getBeanClassName(): " + beanDefinition.getBeanClassName());
try {
Class<?> annotatedClass = Class.forName(beanDefinition.getBeanClassName());
Expand Down

0 comments on commit 2b87789

Please sign in to comment.