Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gtiwari333 committed Dec 5, 2022
1 parent d6697f2 commit 91d9491
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,10 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<!-- required at compile time for graalvm native compile -->
<!-- <scope>runtime</scope>-->
<!-- GraalVMNativeImage: required at compile time for graalvm native compile -->
<!--target/spring-aot/main/sources/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfiguration__BeanDefinitions.java:4:25
java: package org.h2.server.web does not exist-->
<!--<scope>runtime</scope>-->
</dependency>
</dependencies>
<properties>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gt/app/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@Slf4j
@EnableConfigurationProperties(AppProperties.class)
@EnableTransactionManagement(proxyTargetClass = true)
@ImportRuntimeHints(MyRuntimeHints.class)
@ImportRuntimeHints(MyRuntimeHints.class) //required for GraalVMNativeImage::
public class Application {

public static void main(String[] args) throws UnknownHostException {
Expand All @@ -57,6 +57,7 @@ public static void main(String[] args) throws UnknownHostException {

}

//required for GraalVMNativeImage::
class MyRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/gt/app/modules/note/dto/NoteReadDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
public record NoteReadDto(Long id, String title, String content, Long userId, String username, Instant createdDate,
List<FileInfo> files) {

////required for GraalVMNativeImage::
//SpelEvaluationException: EL1004E: Method call: Method size() cannot be found on type java.util.ArrayList
//Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "note.files.size()>0" (template: "note/_notes" - line 43, col 18)
public int getFileSize() {
Expand Down

0 comments on commit 91d9491

Please sign in to comment.