Skip to content

default value for dog is not working #14

@m-pawelczyk

Description

@m-pawelczyk

application.propersties:
spring.profiles.active=EN

gives output:

:: Spring Boot ::        (v2.2.2.RELEASE)

2020-04-08 09:25:24.721  INFO 11199 --- [           main] g.s.sfgdi.SfgDiApplication               : Starting SfgDiApplication on localhost.localdomain with PID 11199 (/home/michal/git/sfg-di/target/classes started by michal in /home/michal/git/sfg-di)
2020-04-08 09:25:24.723  INFO 11199 --- [           main] g.s.sfgdi.SfgDiApplication               : The following profiles are active: EN
2020-04-08 09:25:25.133  WARN 11199 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'petController' defined in file [/home/michal/git/sfg-di/target/classes/guru/springframework/sfgdi/controllers/PetController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'guru.springframework.sfgdi.services.PetService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2020-04-08 09:25:25.143  INFO 11199 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-08 09:25:25.241 ERROR 11199 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in guru.springframework.sfgdi.controllers.PetController required a bean of type 'guru.springframework.sfgdi.services.PetService' that could not be found.


Action:

Consider defining a bean of type 'guru.springframework.sfgdi.services.PetService' in your configuration.


Process finished with exit code 1

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