Skip to content

Commit 4620f6d

Browse files
committed
Use Maven plugin and Paketo buildpack in actuator-webmvc sample
See spring-atticgh-165
1 parent d1fa9b5 commit 4620f6d

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
# actuator-webmvc
2-
3-
The following actuator endpoints are reachable in this app:
4-
5-
/health
6-
/beans
7-
/conditions
8-
/configprops
9-
/info
10-
/env
11-
/mappings
12-
/metrics
1+
Spring Boot project with Spring MVC and Spring Boot actuators.
132

3+
To build and run the native application packaged in a lightweight container:
4+
```
5+
./gradlew bootBuildImage
6+
docker-compose up
7+
```

spring-graalvm-native-samples/actuator-webmvc/compile.sh

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ GRAALVM_VERSION=`native-image --version`
2727
echo "Compiling $ARTIFACT with $GRAALVM_VERSION"
2828
{ time native-image \
2929
--verbose \
30-
--initialize-at-build-time=javax.el.ListELResolver,javax.el.BeanELResolver,javax.el.MapELResolver,javax.el.CompositeELResolver \
3130
-H:Name=$ARTIFACT \
3231
-cp $CP $MAINCLASS >> output.txt ; } 2>> output.txt
3332

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: '3.1'
2+
services:
3+
actuator-webmvc:
4+
image: actuator-webmvc:0.0.1-SNAPSHOT
5+
ports:
6+
- "8080:8080"

spring-graalvm-native-samples/actuator-webmvc/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@
6767
<plugin>
6868
<groupId>org.springframework.boot</groupId>
6969
<artifactId>spring-boot-maven-plugin</artifactId>
70+
<configuration>
71+
<image>
72+
<builder>nebhale/native-image-builder:defer-to-application</builder>
73+
<env>
74+
<BP_BOOT_NATIVE_IMAGE>1</BP_BOOT_NATIVE_IMAGE>
75+
</env>
76+
</image>
77+
</configuration>
7078
</plugin>
7179
</plugins>
7280
</build>

0 commit comments

Comments
 (0)