Home > other >  Java - run on Docker container is created when the called 'org. Springframework. Boot. Autoconf
Java - run on Docker container is created when the called 'org. Springframework. Boot. Autoconf

Time:12-09

I created the spring boot project, if I run it locally would be very good. But, when I will dock this application and in a Docker container runtime. Create a 'org. Springframework. Boot. Autoconfigure. Orm. Jpa. There was a problem HibernateJpaAutoConfiguration' bean
Application. The properties

Spring. The datasource. JDBC - url=XXX
Spring. The datasource. The username=XXX
Spring. The datasource.
the password=XXXSpring. The datasource. The driver - class - name=org. Postgresql. Driver
Spring. The datasource. The maximum - the pool - size=100
Spring. The datasource. TestWhileIdle=true
Spring. The datasource. ValidationQuery=SELECT 1
Spring. Jpa. Hibernate. Naming. Implicit - strategy=org. Hibernate. Boot. Model. Naming. ImplicitNamingStrategyLegacyHbmImpl
Spring. Jpa. Hibernate. Naming. Physical - strategy=org. Springframework. Boot. The orm. Jpa, hibernate. SpringPhysicalNamingStrategy
Spring. Jpa. Hibernate. DDL - auto=update
Spring. Jpa. Database - platform=org. Hibernate. The dialect. PostgreSQLDialect
Spring. Jpa. The generate DDL=true -
Spring. Jpa. Show - SQL=true
Spring. Jpa. Properties. Hibernate. Default_schema=public
Spring. Jpa. Properties. Hibernate. Temp. Use_jdbc_metadata_defaults=false

Dockerfile

FROM its: 8 - JDK
COPY the target/app - *. Jar/app. Jar
EXPOSE 8080/TCP
ENTRYPOINT [" Java ", "- the jar", "/app. Jar"]

Error:

The 2018-08-29 03:56:06. WARN 093 1 - [the main] ConfigServletWebServerApplicationContext: Exception encountered during the context initialization - cancelling refresh attempt: org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'org. Springframework. Boot. Autoconfigure. Orm. Jpa. HibernateJpaConfiguration' : Unsatisfied dependency expressed through the constructor parameter 0; Nested exception is org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'authorizationServerConfiguration: Unsatisfied dependency expressed through the field' the authenticationManager '; Nested exception is org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'webSecurityConfiguration: Unsatisfied dependency expressed through the field' partyPlusUserDetailsService '; Nested exception is org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'partyPlusUserDetailsService defined in the URL [jar: file:/app. Jar!/BOOT - INF/classes!/com/datnt/pplus/service/user/partyPlusUserDetailsService. Class] : Unsatisfied dependency expressed through the constructor parameter 0; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'userRepository: always create a inner beans' (inner beans) # 71238 fc2' of type [org. Springframework. Orm. Jpa. SharedEntityManagerCreator] while setting the bean property 'entityManager'; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name '(inner beans) # 71238 fc2' : always resolve a reference to the bean 'entityManagerFactory while setting the constructor argument; Nested exception is org. Springframework. Beans. Factory. BeanCurrentlyInCreationException: Error creating bean with the name 'entityManagerFactory: Requested bean is currently in creation: is there an unresolvable circular reference?
The 2018-08-29 03:56:06. 099 INFO 1 - [the main] o.a pache, catalina. Core. StandardService: Stopping the service (Tomcat)
The 2018-08-29 03:56:06. 140 INFO 1 - [the main] ConditionEvaluationReportLoggingListener:

Anyone can help me to solve this problem?

CodePudding user response:

Check "application. The properties" and put it in "SRC/main/resources" folder

CodePudding user response:

The building Lord, solved the problem
  • Related