返回首页

Questions tagged [spring-boot]

Spring Boot makes it easy to create Spring-powered, production-grade applications and services with the absolute minimum fuss. It takes an opinionated view of the Spring platform so that new and existing users can quickly get to the bits they need.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Read Database Timestamps with UTC instead of system default timezone using Hibernate

In our spring boot app, we are using ZonedDateTime and hibernate.jdbc.time_zone is set to UTC. While storing, whatever the time we send is getting stored in UTC timezone, while reading the timestamp ...
0
votes
0answers
13 views

Is it possible to create multiple custom validation message for @Valid argument exception?

I want to create custom message for my custom validation annotation. If this validation failed, it throws MethodArgumentNotValidException. Because I put @Valid for the @RequestBody. I create @...
0
votes
0answers
7 views

Query with 'fetch join' can't work for many-to-one relation

I use spring-boot-data-jpa-2.0 to get data from db. A table with foreignkey has many-to-one relation, so there is 1+n issue. I found some solution that says use 'join fetch' can solve. When I use the ...
1
vote
0answers
9 views

Hibernate duplicate entry with OneToMany relation

For example I have a user entity in hibernate with these 2 fields: @Entity @Table(name = "user") public class User { @OneToMany(fetch = FetchType.LAZY) @JsonIgnore private Set<User&...
0
votes
0answers
10 views

How do I make Spring Security 5 OAuth 2 use Apache Commons for RestTemplate

So I'm implementing SMART on FHIR for a System, which means client_credentials grant. Here's how I've configured Spring Security OAuth @Configuration class OauthConfig { @Bean @Scope( ...
0
votes
0answers
10 views

Not able to get this controller to return files with correct mime type

I'm having trouble getting the following simple-minded controller to work correctly with Spring Framework 5.2 and Springboot 2.2 with Kotlin 1.3.50. It's a simple FileServerController that serves ...
1
vote
0answers
10 views

Why is @Transactional needed for delete calls but not update or create?

I have a vague understanding of Transactions in Java. I get the following error javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - ...
0
votes
0answers
5 views

java.lang.ClassNotFoundException: org.modelmapper.ModelMapper thrown when I make Post request but code compiles

I have a sprinboot application with Zuul gateway and Eureka. Project has been fine so far until I added ModelMapper. Below you'll see my controller. . . When I do A post request with: { "...
0
votes
0answers
11 views

Kubernetes and Spring Boot @Service load balancing

I have Kubernetes running on two nodes and one application deployed on the two nodes (two pods, one per node). It's a Spring Boot application. It uses OpenFeign for service discoverability. In the ...
0
votes
0answers
4 views

ModelMapper doesn't know about it's own .map() method until I create the entire assignment?

Only in Eclipse. I successfully used .map() in another file in my project. Now in my controller I've got: import org.modelmapper.ModelMapper; . . . @PostMapping public String createUser(@Valid @...
0
votes
2answers
23 views

Spring Boot & MariaDB - Autowiring Problem - Bean not found

I'm trying to configure my springboot backend to connect with a running mariadb database with the table 'drugs' in the database 'aah4_drugs' I am trying to use the MedicineService and Medicine ...
0
votes
0answers
8 views

Spring boot STATELESS application with JWT auth and csrf token

I have Spring boot application with JWT auth which works great! But I have disabled csrf with STATELESS Policy: .csrf() .disable() .sessionManagement() ....
0
votes
0answers
12 views

Spring Boot, Angular - Fail to handle POST request

I my application I have a POST request through which user can save its profile. The UI is in angular 6. Backend is in Spring Boot. Using JWT to authenticate each request after login. When I send the ...
0
votes
0answers
13 views

Hikari JDbc connection

Noticing errors when there are multiple requests per sec. Have questions on setting hikari connection pool. We have SpringBoot application running on pcf. Below is the application.yml file spring: ...
0
votes
0answers
17 views

Spring Boot @Transactional not working on Weblogic managed transaction

I'm using spring JDBC to execute store procedures. The JNDI is managed by orable weblogic 12c so I dont need to provide host, user or password just the JNDI name to execute them. I have build an api ...
1
vote
1answer
21 views

How can I send two different values through axios api to my backend in one request?

I have a backend out of a spring boot application with REST, with a one to many mapping. I want to assign to Patient the caregiver, for that I need to send both id's so that I can find the elements. ...
0
votes
1answer
16 views

javax.el.PropertyNotFoundException: Property 'username' not found on type java.lang.String

I have included all the necessary but does not why there is error cause plz help me my model is: Entity @Table(name = "user") public class User { @Id @GeneratedValue(strategy = ...
0
votes
0answers
11 views

Are there any benefits of creating multiple Hikari Pool for Read/Write on same database

I was wondering that there would be any benefits if I create two separate Hikari Pools for write / read operations on heavy load systems.(spring boot + hikari + ...)
0
votes
2answers
43 views

How to register a URL stream handler for the gs: protocol in Java Spring

I have code that must be able to handle "normal" urls like "file:///..." and also "gs://..." files. I have an application.yaml file that has bannedKeywordsFile: gs://myproject.appspot.com/mybucket/...
0
votes
1answer
15 views

SonarQube Error in Springboot TypeScript code Analysis - How to deactivate Typescript analysis

I am stuck with this error in Jenkins with sonar. 17:20:29.514 WARN: Invalid character encountered in file /opt/data/jenkins/workspace/../src/main/resources/xxx-test-cert.ts at line 1 for encoding ...
-1
votes
0answers
20 views

AWS Lambda Java - Https calls - Certificate issue

I'm trying to call a http rest api which is hosted in our company through AWS Lambda java spring boot application. But I'm getting "pkix path building failed sun.security.provider.certpath....
0
votes
1answer
20 views

Spring boot, how to insert a new record with in a table with an EmbeddedId

I am new to Spring-boot but kind of familiar with JPA. I have a project I am working on, I already have my database set up and generated my models from my database. I have worked on at least 4 JPA ...
0
votes
1answer
14 views

Hibernate connecting table unique on columns problem

I have problem with hibernate because he creates connecting table (I don't know why will be nice if can tell me where and why), and what is worst he using unique on columns and i cant add more then ...
1
vote
0answers
18 views

Spring Boot Keycloak - authenticates three times per request

We are using Spring Boot 2.1.8 with Undertow and are using Keycloak to authenticate. Each request needs authentication but the servlet calls Keycloak for authentication three times at different points ...
0
votes
1answer
23 views

Spring Boot 2 Actuator Micrometer setup

I have a Spring Boot Application and I have this dependency: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</...
0
votes
0answers
18 views

Programmatic Transaction in CompletableFuture Chain

How can I start a transaction in a completable future chain .thenApply(r -> { // Start transaction here }) .thenCompose(r -> { }) .thenCompose(r -&...
0
votes
0answers
9 views

How to configure Model Mapper with Google Cloud Endpoints only once?

So far, I've only worked with Spring boot and model mapper. In Spring boot, I just had to create a Bean once where I'd configure model mapper (stuff like custom converters) and then just return an ...
0
votes
0answers
17 views

spring boot app deploy as jar file on server

i'm working on a spring boot project and i want to deploy it on server. so i'm familiar with spring boot and i deployed it as WAR or JAR many times but now it goes to drive crazy!! so,when i run jar ...
1
vote
1answer
27 views

Junit test for a output in console

Still I couldn't find the reason to fail the test method for following method. public static void print() { System.out.println("hello"); } My Junit test method is as follows @Test public void ...
0
votes
2answers
24 views

On large JSON strings only in Ajax request, getting MissingServletRequestParameterException: Required String parameter '..' is not present

The following code works 90% of the time on normal-length JSON strings. I receive an incoming JSON String in my SpringMVC Controller, formed from a DataTable .data(). Ajax: function ...
0
votes
1answer
14 views

Background-image in Vaadin 14 Application does not load

I am currently developing a Vaadin 14 Webapp using Spring boot. I want to add a background-image to the app using css but the browser always says that it was unable to load the image. VaddinView: @...
1
vote
0answers
18 views

Spring Security redirects to login page again after successful authentication

I wrote a small spring security oauth provider(App id) spring boot starter and trying to test it http://github.com/yharish991/appid-spring-boot-starter This is how my security configuration looks ...
0
votes
1answer
16 views

Spring Data JPA: Deleting a parent entity, children are not being removed

My entities. ValidationStep has a one to one relationship with documentDetail and documentDetail has a oneToMany relationship of documentValidations ValidationStep @Entity public class ...
0
votes
1answer
16 views

refresh token of docusign in spring boot

I am using docusign api in my spring boot application, for quick start docusign provides a token which expires in 8 hours, that is impractical. so how to refresh this token when it becomes not useful? ...
0
votes
1answer
16 views

How to check Database health and connection pool health

@Component public class CustomHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(Health.Builder builder) throws Exception { // Use the builder to build the ...
0
votes
0answers
5 views

directReports attribute from AD not able to convert to String

I am connecting to AD using Spring Boot LDAP Starter. There is an attribute, directReports which stores the Direct Reportees of user. Way in which AD stores the direct reports: directreports=...
0
votes
1answer
22 views

How to run my Spring tests before every commit/push?

Surprisingly, I was not able to find a this question on this website, so here it comes : How can I run my Spring tests before every git commit/push (CLI, GUI and IDE integration) and have this ...
1
vote
1answer
22 views

Controller validation in Kotlin Spring Boot

I have a RestController with one endpoint. That endpoint accepts object of data class. Data class has 2 attributes. How do I make sure these attributes are validated? My data class: data class ...
0
votes
0answers
13 views

JWT authentication blocking SockJS handshake when trying to make WebSocket connection

I have a working Spring Boot server with Authentication/Authorization. When trying to open a connection with SockJS it is blocked by my other security measures. I don't fully understand how the flow ...
1
vote
0answers
30 views

Spring data JPA transaction delete and save

I am using the spring data JPA CrudRepository extension for persisting and getting data. I have to delete and save the record at the same time in transaction. My Repository layer @Repository ...
0
votes
1answer
28 views

Spring Data REST endpoints gives 404 status code

I am trying to develop a simple spring boot Customer CRUD application. I am using Spring REST Data along with JPA. The endpoints for the CRUD are supposed to be generated automatically but when I try ...
-2
votes
1answer
16 views

Springboot for existing Angular Project

I have intialiazed a from http://start.spring.io/ and imported a maven project into eclipse. Im not quite sure how to proceed further. I am writing a small Angular Application. The front end has ...
0
votes
0answers
7 views

Gradle not recognizing springboot buildInfo plugin

I am trying to add the springboot buildInfo plugin to my build.gradle.kts so I can generate the build-info.properties file and expose the build info (i.e. app version) via the /actuator/info endpoint. ...
0
votes
0answers
25 views

After deploy Google App Engine returns HTTP response code 403

I've done another deploys and all was fine, but after finishing the app, I'm getting this error. And the page request keeps loading. Do I need to configure something in "IAM"? Java 11 Standard ...
0
votes
0answers
3 views

Liquid Template encoding issue with spring boot version 2.0.5

I am using Spring Boot version 2.0.5. and liquid template version 0.7.8 My problem is when I am using German text in the template file and when sending mail then few German characters converted into ?...
1
vote
1answer
30 views

How to avoid duplication of scheduler tasks when deployed in multiple instances

Have a spring Boot application through which i am able to create a cron and schedule the tasks . However when the multiple instances of the app are deployed , the cron gets triggered in all the ...
0
votes
1answer
36 views

Why all value null in request body?

I am calling a REST API from angular 4 client here is angular client code : createQuestion(question: Question): Observable<Question> { return this.http.post<Question>(API_URL + 'create/...
1
vote
1answer
39 views

Unit test a spring component with private constructor without injection

I have a @Component-annotated class, injected using a private constructor, and @Autowired-annotated setters for nested injection. In order to unit test it, a workaround I found is to use @...
0
votes
0answers
8 views

SpringBoot ActiveMQ Disable JMX Connection via 1099

In my application I have integrate Activemq in SpringBoot which allow to create jmx connect via port 1099. I would like to restrict remote jmx connection directly. Is there any way to disable it?
1
vote
1answer
24 views

@PathVariable with slashes in middle of RequestMapping URL

I have a Spring controller mapping like following: @RequestMapping(value = "api/{pathVar1}/receipt", method = RequestMethod.POST) @ResponseBody public String generateReceipt(HttpServletRequest ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞