我复制了react-chartjs文件夹并执行了以下操作:
需要在顶部的react-chartjs/pie库.我没有看到任何控制台错误,但我的饼图未呈现.我甚至尝试过这里提到的所有选项.
var PieChart = require('../../components/react-chartjs/pie');
var MyComponent = React.createClass({
render: function() {
var pieOptions = {
animatable: true,
};
var pieData = [
{
value: 300,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Red"
},
{
value: 50,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Green"
},
{
value: 100,
color: "#FDB45C",
highlight: "#FFC870",
label: "Yellow"
},
{
value: 40,
color: "#949FB1",
highlight: "#A8B3C5",
label: "Grey"
},
{
value: 120,
color: "#4D5360",
highlight: "#616774",
label: "Dark Grey"
}
];
return <PieChart data={pieData} options={pieOptions}/>
} …
Run Code Online (Sandbox Code Playgroud) 尝试为我的实体生成元模型类,因为我在另一个库中有超类,所以我无法生成超类元模型实体。
@Entity
public class Employee extends AbstractCreated {}
@MappedSuperclass
public class AbstractCreated implements Created {}
Run Code Online (Sandbox Code Playgroud)
错误:(10, 76) java: 找不到符号符号:类 AbstractCreated_ 位置:包 com.company.persistence.jpa.entities
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<processors>
<processor>org.immutables.processor.ProxyProcessor</processor>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>5.4.0.Final</version>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<version>2.5.6</version>
</dependency>
</dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我希望所有实体都生成元模型,包括抽象超类。请参阅编译问题,因为未生成类。
quoteEntitiesPage = quoteRepository.findAllByQuoteIds(quoteIds, pageRequest);
如果 quoteIds 参数的计数高于 Short.MAX_VALUE,上面的查询会给出错误“尝试将超出范围的整数作为 2 字节值发送”。
在此处获取所有报价实体的最佳方法是什么?我的 Quote 类有 id(long) 和 quoteId(UUID) 字段。