I don't know how to get property file values other than controller class and test class in Spring Boot.
I tried to get it in another class, just like the way I got it in the controller class.
NullPointerException will occur.
Is it possible to get property file values only from the controller class?
Answer # 1
I answer very roughly.
Annotation of Spring management class such as @Component to an appropriate class,
I think that I could read by doing.
I'm sorry if the format is a little wrong.
- java - when you do not want to change the value of the property (field)
- java - spring framework message resource is not displayed correctly
- java - spring boot cannot be started
- java - i want to read csv from s3 using spring boot and insert it into aurora
- java - i don't know how to return the result value in multiple methods
- return value of indexof method of java array list becomes -1
- java - about the case of using return when the return value is void
- java - i want to get data from mysql using spring jdbc
- i want to find the average value of a two-dimensional array in java
- the value of x is not output (about java integerparseint())
- java - how to specify value when you want to use map as the return type in resttemplate
- displaying the initial value of a form using java servlet and jsp
- java - spring boot image upload
- java - the value of the local variable rccar1 cannot be executed because it is not used
- java - [spring boot + thymeleaf + boot strap] modal is not displayed
- java - i want to connect to mysql with spring boot + mybatis, but a jdbc driver error occurs
- java - meaning of return value of onoptionsitemselected
- how should i create a web application in java (fw is spring) that conforms to the web 3 layer structure?
- java - please tell me how to write the value of list to a variable
- java - i want to be able to log in if the db value and the entered value match when i log in
- java - how to create a war by reflecting the production environment information in the property file on the build server
- java - i want to delete unnecessary rows when reading from csv
- java - [spring] can an instance maintain a singleton when an instance that is di'd with @autowired supports multiple requests?
- java - spring boot @manytomany related setting method
- java - [spring boot] how to correctly return a message with validation applied to a list
- java - the value specified by select button is not registered in db
- java - spring boot project fails to deploy on heroku
- when a bulletin board is created in java and a post is made, an error occurs due to the posting time being reflected
- java - switching the screen display using ajax communication
- java - send data in json format but cannot receive it as a json string