Skip to content

Commit f28454c

Browse files
update grid java demo to v25.4
Provide more simple code for GridJs demo
1 parent b8c6beb commit f28454c

File tree

8 files changed

+89
-420
lines changed

8 files changed

+89
-420
lines changed

Examples.GridJs/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
<dependency>
5252
<groupId>com.aspose</groupId>
5353
<artifactId>aspose-cells</artifactId>
54-
<version>25.3</version>
54+
<version>25.4</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.aspose</groupId>
5858
<artifactId>aspose-cells</artifactId>
59-
<version>25.3</version>
59+
<version>25.4</version>
6060
<classifier>gridjs</classifier>
6161
</dependency>
6262
<!-- <dependency>

Examples.GridJs/src/main/java/com/aspose/gridjs/demo/GridjsdemoApplication.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.springframework.boot.autoconfigure.SpringBootApplication;
66
import org.springframework.stereotype.Component;
77
import org.springframework.context.ApplicationContext;
8+
import org.springframework.context.annotation.ComponentScan;
89

910
import com.aspose.cells.Workbook;
1011
import com.aspose.gridjs.Config;
@@ -15,19 +16,19 @@
1516
import javax.annotation.PostConstruct;
1617

1718

18-
@Component
19-
class MyConfig {
20-
21-
@Value("${testconfig.CachePath}")
22-
public String cachePath;
23-
24-
25-
@Value("${testconfig.AsposeLicensePath}")
26-
public String asposeLicensePath;
27-
28-
29-
}
30-
19+
//@Component
20+
//class MyConfig {
21+
//
22+
// @Value("${testconfig.CachePath}")
23+
// public String cachePath;
24+
//
25+
//
26+
// @Value("${testconfig.AsposeLicensePath}")
27+
// public String asposeLicensePath;
28+
//
29+
//
30+
//}
31+
//@ComponentScan(basePackages = {"com.aspose.gridjs.demo", "com.aspose.gridjs"})
3132
@SpringBootApplication
3233
public class GridjsdemoApplication {
3334

@@ -88,7 +89,7 @@ public static void main(String[] args) {
8889
if ((new File(myConfig.asposeLicensePath)).exists()) {
8990
lic.setLicense(myConfig.asposeLicensePath);
9091
}
91-
init(myConfig);
92+
// init(myConfig);
9293

9394
}
9495

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.aspose.gridjs.demo;
2+
3+
import org.springframework.beans.factory.annotation.Value;
4+
import org.springframework.context.annotation.Bean;
5+
import org.springframework.context.annotation.Configuration;
6+
7+
import com.aspose.gridjs.GridJsOptions;
8+
import com.aspose.gridjs.GridJsService;
9+
import com.aspose.gridjs.IGridJsService;
10+
11+
@Configuration
12+
public class MyConfig {
13+
@Value("${testconfig.CachePath}")
14+
public String cachePath;
15+
16+
17+
@Value("${testconfig.AsposeLicensePath}")
18+
public String asposeLicensePath;
19+
20+
@Bean
21+
public GridJsOptions gridJsOptions() {
22+
GridJsOptions options=new GridJsOptions();
23+
options.setFileCacheDirectory(cachePath);
24+
return options;
25+
}
26+
27+
@Bean
28+
public IGridJsService gridJsService(GridJsOptions gridJsOptions) throws Exception {
29+
return new GridJsService(gridJsOptions);
30+
}
31+
}

0 commit comments

Comments
 (0)