Skip to content

Commit

Permalink
refactor(servlet): remove hardcoded package name
Browse files Browse the repository at this point in the history
refs #1684
  • Loading branch information
jo-elimu committed Jul 13, 2024
1 parent 1db5f4f commit db4e2fc
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 db4e2fc

Please sign in to comment.