小编ste*_*rym的帖子

SXSSFWorkbook上的AutosizeColumns

是否可以在流式SXSSFWorkbook上使用autoSizeColumns?我实现了导出功能,以将对象列表导出为ex​​cel.起初我使用了XSSFWorkbook(不是流式传输),在创建了所有单元格之后,我自动化了所有列,产生了一个很好的excel文件.

对于性能问题,我们希望将工作簿更改为流式版本,但这会在org.apache.poi.ss.util.SheetUtil.getCellWidth中生成NullPointer.

是否可以为SXSSFWorkbook调用autoSizeColumns?

我使用的是poi-ooxml 3.9,但我在3.8中遇到了同样的问题.

java nullpointerexception apache-poi

16
推荐指数
2
解决办法
2万
查看次数

加载时间在grails中编织

我正在尝试在Grails项目中使用加载时编织,以便能够序列化和反序列化对象并自动注入spring依赖项.经过一番搜索后,我发现了一个简单的例子,它似乎按预期工作.但在将相同的配置应用于简单的Grails项目后,我遇到了很多错误.例如:

[TomcatInstrumentableClassLoader@413a2870] error at org/springframework/web/servlet/theme/AbstractThemeResolver.java::0 class 'org.springframework.web.servlet.theme.AbstractThemeResolver' is already woven and has not been built in reweavable mode
Run Code Online (Sandbox Code Playgroud)

为了测试这个,我创建了一个新的grails项目并更改了applicationContext.xml:

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context.xsd">

<context:spring-configured />
<context:load-time-weaver aspectj-weaving="autodetect" weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/>
Run Code Online (Sandbox Code Playgroud)

在这个文件中我还创建了一个新bean:

<bean class="be.testweaving.Person" scope="prototype">
    <property name="name" value="Timon"/>
</bean>
Run Code Online (Sandbox Code Playgroud)

这定义了Person类的原型并将值Timon注入name属性.

我把它打包成战争使用grails war并在tomcat服务器上部署它.这个tomcat有org.springframework.instrument.tomcat-3.0.5.RELEASE.jar他的lib目录,在部署之后我看到了我上面提到的大量错误列表.

有没有人能够在Grails中配置加载时间编织?

grails aop spring

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

标签 统计

aop ×1

apache-poi ×1

grails ×1

java ×1

nullpointerexception ×1

spring ×1