Java/Spring Boot JPA
not importing JSONException and JSONObject issue
remoted
2024. 4. 4. 09:54
728x90
JSONException and JSONObject components called from JSON Library were not imported in Jenkins compiling stage.
Components are not included in or are not recognized at the JVM level, which is expected.
Despite these issues causing some users, I have no idea why they happen.
Change Below
import org.springframework.boot.configurationprocessor.json.JSONObject;
import org.springframework.boot.configurationprocessor.json.JSONException;
to
import org.json.JSONException;
import org.json.JSONObject;
Also, import JSON directly
implementation 'org.json:json:20240303'