skip to Main Content

How do I set values in environment for Spring Boot app in Ubuntu 22.04?

I am trying to set below values in enviornment (Ubuntu 22.04) spring.datasource.url = jdbc:mysql://localhost:3306/abc?useSSL=false spring.datasource.username = root spring.datasource.password = root I have set values in enviornment as export spring_datasource_url_prefix=mysql export spring_datasource_host=localhost export spring_datasource_port=3306 export spring_datasource_database=abc export spring_datasource_username=root export spring_datasource_password=root And…

VIEW QUESTION

Json – Why camel-case fields are not recognized by API?

I have defined my request class like: @Data @AllArgsConstructor @NoArgsConstructor public class SampleRequest { @NotBlank private String firstName; private String middleName; @NotBlank private String lastName; } Controller as: @PostMapping(path = "mydetails", consumes = {MediaType.APPLICATION_JSON_VALUE}) public DeferredResult<DetailsResponse> saveMyDetails(@Validated @RequestBody SampleRequest sampleRequest)…

VIEW QUESTION

java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null – Mysql

`HTTP Status 500 – Internal Server Error Type Exception Report Message Request processing failed: java.lang.NullPointerException: Cannot invoke "com.example.repository.StudentRepository.save(Object)" because "this.studentRepository" is null Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception jakarta.servlet.ServletException: Request processing…

VIEW QUESTION
Back To Top
Search