Spring roo project中 异常:
Multiple markers at this line
- The local variable a is never read
- String literal is not properly closed by a double-
quote
Spring Roo 目前还不直接支持UTF8,只支持西欧字体,用native2ascii转,可以使用maven的plugin了。
下面是配置例子:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<configuration>
<tasks>
<native2ascii
encoding="UTF-8"
src="src/main/webapp/WEB-INF/i18n"
dest="target/${name}-${version}/WEB-INF/i18n"
includes="*_zh.properties"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</plugin>
例如:spring roo project中 :
String hello = "你";
当遇到奇数个汉字的声明的时候会报错误。
处理方法如上!