Почему репозитории в jpa с mysql ничего не возвращают? - PullRequest
0 голосов
/ 25 апреля 2019

Я реализовал приложение весной с jpa и mysql, но @repositories не работает, метод findAll возвращает Arraylist размера 0.

application.properties:

spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/usuarios?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=

Объект: https://pastebin.com/XqwdPhYj

Контроллер: https://pastebin.com/TPgiwrx2

Хранилища: https://pastebin.com/J5u08wRU

Служба: https://pastebin.com/XAJRuBi6

Фасад: https://pastebin.com/pTNeCZun

Демонстрационное приложение: https://pastebin.com/vTmBHTaH

консольный журнал:

:: Spring Boot ::  (v2.1.5.BUILD-SNAPSHOT)

2019-04-24 23:51:55.209  INFO 400 --- [  restartedMain] DemoApplication                          : Starting DemoApplication on DESKTOP-B85SDDT with PID 400 (C:\Users\adminUser\Desktop\demo\target\classes started by adminUser in C:\Users\adminUser\Desktop\demo)
2019-04-24 23:51:55.213  INFO 400 --- [  restartedMain] DemoApplication                          : No active profile set, falling back to default profiles: default
2019-04-24 23:51:55.269  INFO 400 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-04-24 23:51:55.269  INFO 400 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-04-24 23:51:56.137  INFO 400 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-04-24 23:52:13.106  INFO 400 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 16963ms. Found 1 repository interfaces.
2019-04-24 23:52:13.664  INFO 400 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dd8cb8a5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:13.686  INFO 400 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$5d0d05d7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-24 23:52:14.127  INFO 400 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-04-24 23:52:14.155  INFO 400 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-04-24 23:52:14.156  INFO 400 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.19]
2019-04-24 23:52:14.263  INFO 400 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-04-24 23:52:14.263  INFO 400 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 18994 ms
2019-04-24 23:52:14.562  INFO 400 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2019-04-24 23:52:14.679  INFO 400 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2019-04-24 23:52:14.742  INFO 400 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2019-04-24 23:52:14.816  INFO 400 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.9.Final}
2019-04-24 23:52:14.817  INFO 400 --- [  restartedMain] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-04-24 23:52:14.930  INFO 400 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-04-24 23:52:15.048  INFO 400 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-04-24 23:52:15.356  INFO 400 --- [  restartedMain] org.hibernate.tuple.PojoInstantiator     : HHH000182: No default (no-argument) constructor for class: entidades.Clientes (class must be instantiated by Interceptor)
2019-04-24 23:52:15.607  INFO 400 --- [  restartedMain] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@77c69f90'
2019-04-24 23:52:15.609  INFO 400 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-04-24 23:52:15.703  INFO 400 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2019-04-24 23:52:16.549  INFO 400 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-04-24 23:52:16.784  WARN 400 --- [  restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2019-04-24 23:52:17.166  INFO 400 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2019-04-24 23:52:17.171  INFO 400 --- [  restartedMain] DemoApplication                          : Started DemoApplication in 22.376 seconds (JVM running for 22.691)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...