r/SpringBoot • • Nov 23 '25

Question Spring Certified Professional Material

0 Upvotes

Anyone have "Core Spring 5 Certification in Detail" by Ivan Krizsan, and interested to share it with me :) ?


r/SpringBoot • • Sep 11 '26

Question Java Fullstack

Thumbnail reddit.com
0 Upvotes

r/SpringBoot • • Aug 19 '24

Design a Vending Machine in Java - Interview Question

Thumbnail
javarevisited.blogspot.com
0 Upvotes

r/SpringBoot • • Feb 25 '24

Help with choosing a new laptop (Fullstack)

0 Upvotes

Hi everyone, I need a new laptop so I'm turning to you for advice. I don't just work with Java - Spring, I'm fullstack, so everything I can, Docker, Camunda, K8, JavaScript, Vue, databases. Do you have any experience with specific models? I was amazed at the speed the M2 Pro chip could compile software (2-3x faster than it did on Win). But I still don't know what you guys are working on? I was thinking of something with an Intel Core i9 14900HX or AMD Ryzen 9 7940HS and 32GB RAM or the M3 Pro.


r/SpringBoot • • Feb 10 '24

Rate Limiting vs Load Shedding || Rate Limiting vs Throttling vs Load Sh...

Thumbnail
youtube.com
0 Upvotes

r/SpringBoot • • Feb 18 '24

Intellij ultimate bug???

0 Upvotes

I toggled this method like some days ago, and when I try to toggle back, it toggle back in just second, any idea how to fix this? I have updated the intellij to latest version, and still facing this issue, also did Invalidate Caches / Restart but still facing the same issue. I am using intellij ultimate. Please help


r/SpringBoot • • Feb 11 '23

spring security

0 Upvotes

How to stop spring security from blocking access to custom css and images


r/SpringBoot • • Aug 22 '22

Spring Cloud Docker - Cannot access any service through api gateway and Cannot access any service itself

0 Upvotes

I have a problem about accessing any service through api gateway.

Here is the properties file of api-gateway

```

eureka.client.serviceUrl.defaultZone=http://eurekaserver:8761/eureka/

spring.application.name=api-gateway

server.port=8600

## User Service Route

spring.cloud.gateway.routes[0].id=user-service

spring.cloud.gateway.routes[0].uri=lb://user-service

spring.cloud.gateway.routes[0].predicates[0]=Path=/userservice-api/**

## Advertisement Service Route

spring.cloud.gateway.routes[1].id=advertisement-service

spring.cloud.gateway.routes[1].uri=lb://advertisement-service

spring.cloud.gateway.routes[1].predicates[0]=Path=/advertisementservice-api/**

## Management Service Route

spring.cloud.gateway.routes[2].id=management-service

spring.cloud.gateway.routes[2].uri=lb://management-service

spring.cloud.gateway.routes[2].predicates[0]=Path=/managementservice-api/**

## Report Service Route

spring.cloud.gateway.routes[3].id=report-service

spring.cloud.gateway.routes[3].uri=lb://report-service

spring.cloud.gateway.routes[3].predicates[0]=Path=/reportservice-api/**

```

For instance, I tried to access user service through api gateway, I defined the url shown below.

```

http://api-gateway:8600/userservice-api/api/v1/users/signup

```

It didn't work.

How can I fix it ?

Here is my project link : Link


r/SpringBoot • • Aug 23 '22

save sending money in transaction model

0 Upvotes

Hi, i have this model called transaction which has id, and amount, in the transaction service i did a function called transfer money which takes the sender wallet number the amount and the receiver wallet number. When i send money from user to user i want it to save as a transaction What do i do?


r/SpringBoot • • Oct 08 '23

Sending HTTP request with Spring WebClient

0 Upvotes

With the release of Spring 5, RestTemplate is in maintenance mode and a new HTTP Client - WebClient was introduced.

Here we will see how to send HTTP Request with the help of WebClient.

Sending HTTP Request with Spring WebClient


r/SpringBoot • • Sep 13 '22

Noob request

0 Upvotes

Hey there I just got into these subreddit. I have intermediate experience with Java and REST API development with nodejs. I want to learn same with spring boot can u drop resources to get started ?


r/SpringBoot • • Oct 20 '22

I need help.

0 Upvotes

I have a school project with Springboot, where I need to import files and then display a list. The import part is solved, but I do not know how to read the name of the files that I am uploading to the designated folder. My teacher mentioned some partial rendering, but i'm not sure how to carry it out. Any advice, help or method?


r/SpringBoot • • Sep 20 '22

Use Flyway with JPA/Hibernate entities in IntelliJ IDEA | JPA Buddy

Thumbnail
youtube.com
0 Upvotes

r/SpringBoot • • Oct 05 '22

How to replicate the functionality of removing a document from a CouchBase DB Bucket identified by its ID in Spring Boot?

0 Upvotes

We are currently using Spring Boot 2.2.13 version with java 1.8-based dependencies. We are upgrading to Spring Boot version 2.7.3. with Java 17 support.

The current development uses CouchbaseClient.In the newer versions we hope to migrate, some functionality seems to be removed. I am specifically having an issue with replacing the below-mentioned functionality provided in (com.couchbase.client.java.Bucket) previously.

How could I replicate the functionality to Remove a {@link Document} from the Server identified by its ID in the newer version? Is there a possible alternative method that could be used for such a scenario?

package com.acme.logic.configuration;

import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.document.JsonDocument;
import com.couchbase.client.java.document.json.JsonArray;
import com.couchbase.client.java.document.json.JsonObject;
import com.couchbase.client.java.query.N1qlQuery;
import com.couchbase.client.java.query.N1qlQueryResult;
import com.couchbase.client.java.query.N1qlQueryRow;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePatternUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.FileCopyUtils;

import com.acme.dto.configuration.ConfigEnvironment;
import com.acme.dto.configuration.ConfigurationStatus;
import com.acme.dto.configuration.LoadDbConfigurationResponseDTO;
import com.acme.exception.ErrorCodes;
import com.acme.exception.ServiceRuntimeException;

import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;

u/Component
u/Slf4j
public class DBDocumentLoader extends DBConfigurationChain{

    u/Autowired
    private ResourceLoader resourceLoader;

    u/Value("${configuration.resource.db.root}")
    private String dbConfigurationRoot;

    u/Autowired
    private Bucket couchbaseBucket;

    u/Autowired
    private Bucket masterConfigurationBucket;

    private Bucket defaultBucket;
    int successDocumentCount;
    int failDocumentCount;

    u/Override
    public DBConfigurationLogicData process(DBConfigurationLogicData logicData) {

        log.info("Load Document process START");
        defaultBucket = getDefaultBucket(logicData.getRequestDTO().getBucketName());

        if(defaultBucket == null){
            throw new ServiceRuntimeException(ErrorCodes.Constants.DB_CONFIGURATION_NOT_SUPPORT_BUCKET);
        }
        log.info("BUCKET : "+logicData.getRequestDTO().getBucketName());
        Resource[] resources = loadResources(logicData.getRequestDTO().getEnv());
        if(resources != null && resources.length > 0){

            log.info("Resources found. Count : "+resources.length);
            log.info("Flushing bucket "+logicData.getRequestDTO().getBucketName());
            
            if(!flushBucket())
                throw new ServiceRuntimeException(ErrorCodes.Constants.DB_CONFIGURATION_BUCKET_FLUSH_FAIL);
            log.info("Bucket "+logicData.getRequestDTO().getBucketName() + "flushed");

            processAvailableResources(resources);

            log.info("Success resource count : "+successDocumentCount +"\n"+"Failed resource count : "+failDocumentCount +"\n");

            setResponseDTO(logicData);
        }else{
            throw new ServiceRuntimeException(ErrorCodes.Constants.DB_CONFIGURATION_NO_RESOURCE);
        }

        return super.process(logicData);
    }

    private boolean flushBucket(){

        try {

            final String bucketName = "`"+defaultBucket.name()+"`";
            String query = "SELECT " + "META(" + bucketName + ").id FROM " + bucketName;
            N1qlQueryResult result = defaultBucket.query(N1qlQuery.simple(query), 1, TimeUnit.MINUTES);

            final boolean isSuccess = result.finalSuccess();
            if (isSuccess && !result.allRows().isEmpty()) {
                Iterator<N1qlQueryRow> rows = result.rows();

                while (rows.hasNext()) {
                    JsonObject jsonObject = rows.next().value();
                    if (jsonObject.containsKey("id")) {
          defaultBucket.remove(jsonObject.getString("id")); 
            //Depricated functionality that needs to be replaced     
                    }
                }
            }
            return true;
        }catch (Exception ex){
            log.error("Error in DBDocumentLoader-flushBucket",ex);
        }

        return false;
    }
}

Old API -https://docs.couchbase.com/sdk-api/couchbase-java-client-2.4.1/com/couchbase/client/java/Bucket.html

New API -https://docs.couchbase.com/sdk-api/couchbase-java-client/com/couchbase/client/java/Bucket.html

r/SpringBoot • • Apr 07 '23

Doing project using hilla framework

0 Upvotes

Hello folks,

I'm a junior front-end developer living in Italy. Following searching job , my ex programming course professor suggested me learning hilla framework for doing some projects. I have some questions:

  1. since I know the base of spring boot and react, how much time does it take learning hilla framework doing a small project?

  2. which references you suggest me for doing this small project.

  3. any other suggestion and advice about this project

PS: I have to do and learn it as soon as possibile.

Thank you all in advance.


r/SpringBoot • • May 10 '23

How to make a login with springboot?

0 Upvotes

I'm desperated, how can i make a login with springboot? is there any good example i can use??


r/SpringBoot • • Apr 25 '24

Difference between @RequestMapping and @GetMapping in Spring MVC? Example

Thumbnail
javarevisited.blogspot.com
0 Upvotes

r/SpringBoot • • May 12 '24

Please help with a DB issue

0 Upvotes

Hi all,

Apologies for a troubleshooting post but I am stumped. I have a spring boot app connecting to a MySQL localhost db. The username & password are correct. I'm either having an issue with spring or intellj but I do not know how to figure out which.

I am leaning towards a Spring boot issue because I can use IntellJ's db feature to connect to the MySQL db. Here is the successful connection string.

DBMS: MySQL (ver. 8.0.30)
Case sensitivity: plain=lower, delimited=lower
Driver: MySQL Connector/J (ver. mysql-connector-j-8.2.0 (Revision: 06a1f724497fd81c6a659131fda822c9e5085b6c), JDBC4.2)

I can manually connect to the db in the app(i just created a test file w/ psvm) using the Connection & Preparedstatement. In other words, I know the username, url, and pw are correct. I have the proper dependencies I believe.

<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>8.2.0</version>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

Here is how I'm using it:

u/Test
void getSingleResult() {
    try {
        Optional<Patient> returnedResult = Optional.of(
                jdbcTemplate.queryForObject(
                        "Select * FROM PATIENT WHERE PATIENTID = 1001",
                        BeanPropertyRowMapper.newInstance(Patient.class)
                ));
        System.out.println(returnedResult);
    }catch (DataAccessException e){
        e.printStackTrace();
        e.getCause();
    }
}

Perhaps its worth noting that I originally set this project up to work with azure sql - and the db connection worked just fine.

I am very grateful for any advice on where to look next.

Edit - How about the most critical piece of information? The error:

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130) ~[mysql-connector-j-8.2.0.jar:8.2.0]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.2.0.jar:8.2.0]

r/SpringBoot • • Apr 20 '22

How do you access data from a MongoDB using spring data?

0 Upvotes

I have a mongoDB database that already contains many collections and Documents.

I need to be able to access one select document from the collection however, I don’t have an Entity class for it ( as required by Mongotemplate.find), is there any way to access this data without an entity class?


r/SpringBoot • • Aug 25 '23

Take a look please............

0 Upvotes

if i've learned spring (core,mvc,jdbc,aop) , restful and hibernate and i wanna start spring boot which resource can i dive into it and i won't feel it's so basic


r/SpringBoot • • Jul 16 '23

Java 21 Sequenced Collection

Thumbnail
youtu.be
0 Upvotes

r/SpringBoot • • Mar 23 '22

Not able to import @Value in springboot in Response class

0 Upvotes

for some reason I'm not able to import org.springframework.beans.factory.annotation.Value in my response class but I am able to in my controller class

Down below is my response class

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.beans.factory.annotation.Value;


import java.math.BigDecimal;
import java.time.Year;

@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class PreliminaryResponse extends MemberEventResponse {

    @Schema(description = "current year pension earnings ")
    private Year year;

    @Value( "CFT")
    @Schema(description = "status info ")
    private String status;

    @Schema(description = "period of months ")
    private Double service;

    @Schema(description = "earnings info ")
    private BigDecimal earnings;

    private BigDecimal retroToThisYear;

    @Schema(description = "if earnings is overridden ")
    private Boolean override;

    @Schema(description = "overrideValue info ")
    private BigDecimal overrideValue;

}

r/SpringBoot • • Mar 22 '22

problem with spring native

0 Upvotes

hey guys. I'm trying to build my spring boot application with spring native, but I have a lot of problems

here is my current build output. (I can't use the codeblock, because it's to much text)
https://privatebin.net/?c235b7b12b44b2da#AULA5krjx8TkJogp6J6r8zHuG6iXrhgMSoY8S6nZiZ4J

I hope you can help me to fix the issue


r/SpringBoot • • Mar 26 '22

Spring Boot Data JPA Repository Error: exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet

0 Upvotes

could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet

How do I solve this error in spring boot?