Skip to content

@EntityScan(basePackageClasses = {Jsr310JpaConverters.class}) #7

Open
@monxarat

Description

@monxarat

Hi @callicoder
When I add config @EntityScan(basePackageClasses = {Jsr310JpaConverters.class}) to Application class.

and add method init(). The bellow error has occurred. And not started Tomcat.

@PostConstruct
void init() {
        TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
    }

org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through field 
'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'userService'; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 
'userService': Unsatisfied dependency expressed through field 'userRepository'; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'userRepository': Invocation of init method failed; 
nested exception is java.lang.IllegalArgumentException: Not a managed type: class example.database.entry.User

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions