小编Run*_*omu的帖子

Spring Data JPA OutOfMemoryError:超出了GC开销限制

我正在开发一个具有大量实体的应用程序(3072).我们使用jhipster进行项目结构.到目前为止,Everthing还可以,直到我们想要将Spring Boot版本从1.3.2(1.9.2 spring-data-jpa)升级到当前的1.5.1(spring-data-jpa 1.11.0)我在启动时遇到异常.提供更多内存,堆大小等没有帮助.我认为问题在某种程度上与1.10.X之后的spring-data-jpa有关,因为我们在spring-data-jpa 1.9.x中没有这样的问题

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ebysMesajTasfiyeJob': Unsatisfied dependency expressed through field 'messageService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ebysMessageService': Unsatisfied dependency expressed through field 'saklamaPlaniService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'YEBYSaklamaPlaniService': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'YEBYSaklamaPlaniRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean …
Run Code Online (Sandbox Code Playgroud)

java spring-data-jpa spring-boot jhipster

7
推荐指数
1
解决办法
3527
查看次数

Spring Data Repository 的方面建议不起作用

我正在尝试为存储库创建一些切入点和之前的建议,以便为 Spring Boot 中 Spring Data 中的某些存储库启用对 entitymanager 的过滤。我在项目中也有 Web 和服务层,并且 AspectLogging 对两者都适用。但是我不能对存储库做同样的事情。我已经挣扎了 2 天,我尝试了很多方法来修复它。我阅读了几乎所有关于此的文档、问题和线程(代理问题 CGlib 和 JDK 代理等)。我使用 jhipster 来创建项目。

除了@Pointcut 和 CrudRepository,我无法部署应用程序。甚至它部署的 @Before 也没有在 Repository 中调用方法调用。我想我有一个类似的问题,如以下问题。代理混淆

    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.xxx.zzz.business.repository.ApplyRepository com.xxx.zzz.web.rest.applyResource.ApplyRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applyRepository': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class com.sun.proxy.$Proxy173]: Common causes of this problem include using a final class or a …
Run Code Online (Sandbox Code Playgroud)

java proxy aspectj spring-aop spring-data-jpa

5
推荐指数
1
解决办法
8658
查看次数

Apache Tika Api 消耗给定的流

我使用项目的 Apache Tika 包依赖项来找出文件的 MimeTypes。由于一些问题,我们必须通过 InputStream 来查找。它实际上保证标记/重置给定的 InputStream。Tika-Bundle 包括核心和解析器 api,并使用 PoifscontainerDetector、ZipContainerDetector、OggDetector、MimeTypes 和 Magic 进行检测。我已经调试了 3 个小时,所有的 Detectors 都在检测后标记并重置。我是按照以下方式做的。

  TikaInputStream tis = null;
    try {
        TikaConfig config = new TikaConfig();
        tikaDetector = config.getDetector();
        tis =  TikaInputStream.get(in);
        MediaType mediaType = tikaDetector.detect(tis, new Metadata());

        if (mediaType != null) {
            String[] types = mediaType.toString().split(",");

            for (int i = 0; i < types.length; i++) {
                mimeTypes.add(new MimeType(types[i]));
            }
        }

    } catch (Exception e) {
        logger.error("Mime Type for given Stream could not be resolved: ", e); …
Run Code Online (Sandbox Code Playgroud)

apache stream mime-types apache-tika

1
推荐指数
1
解决办法
2313
查看次数