An app with the following dependencies will fail to start:

implementation("org.springframework.boot:spring-boot-micrometer-metrics")
implementation("org.springframework.boot:spring-boot-starter-web")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")

The failure is a CNFE:

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.micrometer.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration$PrometheusScrapeEndpointConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@2626b418]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483) ~[spring-core-7.0.0-M9.jar:7.0.0-M9]
        at org.springframework.util.ReflectionUtils.findMethod(ReflectionUtils.java:240) ~[spring-core-7.0.0-M9.jar:7.0.0-M9]
        at org.springframework.util.ReflectionUtils.findMethod(ReflectionUtils.java:221) ~[spring-core-7.0.0-M9.jar:7.0.0-M9]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.findBeanMethod(OnBeanCondition.java:705) ~[spring-boot-autoconfigure-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.getMethodReturnType(OnBeanCondition.java:700) ~[spring-boot-autoconfigure-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.getReturnType(OnBeanCondition.java:684) ~[spring-boot-autoconfigure-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:673) ~[spring-boot-autoconfigure-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
        ... 21 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpoint
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
        at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3578) ~[na:na]
        at java.base/java.lang.Class.getDeclaredMethods(Class.java:2676) ~[na:na]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465) ~[spring-core-7.0.0-M9.jar:7.0.0-M9]
        ... 27 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[na:na]
        ... 31 common frames omitted

In addition to the auto-configuration referencing Actuator classes, PrometheusProperties also does so. To overcome this, all of the Prometheus-related code should move from spring-boot-actuator to spring-boot-metrics.