100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

EX378

Rating
-
Sold
-
Pages
41
Grade
A+
Uploaded on
05-07-2025
Written in
2024/2025

Killtest proporciona las últimas preguntas prácticas EX378 para ayudarte a aprobar con éxito tu examen de certificación Red Hat Certified Cloud-native Developer. Esta es una manera detallada de obtener las últimas preguntas y respuestas EX378, garantizando que estés bien preparado. Las preguntas del examen EX378 proporcionan ejercicios reales o simulados, confirmando la familiaridad con el formato real del examen. Practicando con las preguntas prácticas de Red Hat Certified Cloud-native Developer EX378, puedes mejorar tu velocidad y precisión. #EX378

Show more Read less
Institution
Self Learning
Course
Self Learning











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Self Learning
Course
Self Learning

Document information

Uploaded on
July 5, 2025
Number of pages
41
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

EX378
Red Hat Certified Cloud-
native Developer exam

,1. Create a configuration property for the application name and inject it into a CDI
bean.
A. See the Explanation.
Answer: A
Explanation:

2. Add to application.properties: app.name=CloudNativeApp

3. Create a bean:
@ApplicationScoped
public class AppNameService {
@Inject
@ConfigProperty(name = "app.name")




as
st
String appName;




ue
sp
public String getAppName() {




re
return appName;




y
as
nt
}




gu
e
}


pr
as
m
ti
4. Inject AppNameService into a REST endpoint or another bean to use it.
úl
s
la
n
co
en
m




5. Externalize a boolean flag and use it to enable/disable a service method.
a
ex




A. See the Explanation.
su
e




Answer: A
eb
u




Explanation:
pr
-A
8
37




6. In application.properties:
X
E
s




feature.enabled=true
ca
ti
ác
pr




7. Inject the flag:
as
nt




@ApplicationScoped
gu
re




public class FeatureService {
P




@Inject
@ConfigProperty(name = "feature.enabled")
boolean enabled;
public String execute() {
return enabled ? "Feature is ON" : "Feature is OFF";
}
}


8. Use default values when a configuration property is missing.

,A. See the Explanation.
Answer: A
Explanation:
@ApplicationScoped
public class TimeoutService {
@Inject
@ConfigProperty(name = "request.timeout", defaultValue = "5000")
int timeout;
public int getTimeout() {
return timeout;
}
}
This allows your app to run even if request.timeout is not in the config file.




as
st
ue
sp
re
9. Inject a configuration property into a constructor using MicroProfile Config.




y
as
nt
A. See the Explanation.




gu
e
Answer: A


pr
as
Explanation: ti
m
@ApplicationScoped
úl
s
la




public class DatabaseService {
n
co




private final String jdbcUrl;
en
m




@Inject
a
ex




public DatabaseService(@ConfigProperty(name = "db.url") String jdbcUrl) {
su
e




this.jdbcUrl = jdbcUrl;
eb
u




}
pr
-A




public String getJdbcUrl() {
8
37




return jdbcUrl;
X
E
s




}
ca
ti
ác




}
pr




Ensure db.url is defined in application.properties.
as
nt
gu
re
P




10. Inject a property into a JAX-RS resource class.
A. See the Explanation.
Answer: A
Explanation:
@Path("/env")
public class EnvResource {
@Inject
@ConfigProperty(name = "env.type")
String envType;
@GET

, public String getEnv() {
return "Environment: " + envType;
}
}
Declare env.type=dev in application.properties.


11. Use a configuration property to control bean behavior via conditional logic.
A. See the Explanation.
Answer: A
Explanation:

12. In application.properties: logging.verbose=false




as
st
ue
sp
13. In the service:




re
@ApplicationScoped




y
as
nt
public class LoggerService {




gu
e
@Inject


pr
as
@ConfigProperty(name = "logging.verbose") ti
m
boolean verbose;
úl
s
la




public void log(String message) {
n
co




if (verbose) System.out.println("[VERBOSE] " + message);
en
m




}
a
ex




}
su
e
eb
u
pr
-A




14. Inject a list of values from a comma-separated property.
8
37




A. See the Explanation.
X
E
s




Answer: A
ca
ti
ác




Explanation:
pr




supported.locales=en,fr,de
as
nt




@ApplicationScoped
gu
re




public class LocaleService {
P




@Inject
@ConfigProperty(name = "supported.locales")
List<String> locales;
public List<String> getLocales() {
return locales;
}
}
MicroProfile config automatically converts the string to List<String>.
Free
Get access to the full document:
Download

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
ebaytter

Get to know the seller

Seller avatar
ebaytter Exam
View profile
Follow You need to be logged in order to follow users or courses
Sold
3
Member since
1 year
Number of followers
0
Documents
71
Last sold
3 months ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions