repo
stringclasses
1k values
file_url
stringlengths
96
373
file_path
stringlengths
11
294
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
6 values
commit_sha
stringclasses
1k values
retrieved_at
stringdate
2026-01-04 14:45:56
2026-01-04 18:30:23
truncated
bool
2 classes
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/matrix/EmployeeNoMvcIntegrationTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/matrix/EmployeeNoMvcIntegrationTest.java
package com.baeldung.matrix; import com.baeldung.matrix.config.MatrixWebConfig; import com.baeldung.matrix.controller.EmployeeController; import com.baeldung.matrix.model.Employee; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/matrix/EmployeeMvcIntegrationTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/matrix/EmployeeMvcIntegrationTest.java
package com.baeldung.matrix; import com.baeldung.matrix.config.MatrixWebConfig; import com.baeldung.matrix.controller.EmployeeController; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitAndJUnitLiveTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitAndJUnitLiveTest.java
package com.baeldung.htmlunit; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class HtmlUnitAndJUnitLiveTest { private WebClient webClient; @Before ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitWebScrapingLiveTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitWebScrapingLiveTest.java
package com.baeldung.htmlunit; import java.util.List; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlAnchor; import com.gargoylesoftware.htmlunit.html.HtmlPage; public clas...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitAndSpringLiveTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/HtmlUnitAndSpringLiveTest.java
package com.baeldung.htmlunit; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUni...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/TestConfig.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/htmlunit/TestConfig.java
package com.baeldung.htmlunit; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configurati...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/multiparttesting/MultipartPostRequestControllerUnitTest.java
spring-web-modules/spring-mvc-java-2/src/test/java/com/baeldung/multiparttesting/MultipartPostRequestControllerUnitTest.java
package com.baeldung.multiparttesting; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.a...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/servlets/CounterServlet.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/servlets/CounterServlet.java
package com.baeldung.servlets; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; @WebServlet(urlPatterns = "/counter", name = "c...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/servlets/UppercaseServlet.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/servlets/UppercaseServlet.java
package com.baeldung.servlets; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; @WebServlet(urlPatterns = "/uppercase", name = ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/ExcelPOIHelper.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/ExcelPOIHelper.java
package com.baeldung.excel; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.IntStream; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.u...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/ExcelController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/ExcelController.java
package com.baeldung.excel; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Map; import jakarta.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/WebConfig.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/WebConfig.java
package com.baeldung.excel; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/MyCell.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/excel/MyCell.java
package com.baeldung.excel; public class MyCell { private String content; private String textColor; private String bgColor; private String textSize; private String textWeight; public MyCell() { } public MyCell(String content) { this.content = content; } public String ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheControlController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheControlController.java
package com.baeldung.cache; import org.springframework.http.CacheControl; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheWebConfig.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheWebConfig.java
package com.baeldung.cache; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.CacheControl; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annota...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/controller/CompanyController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/controller/CompanyController.java
package com.baeldung.matrix.controller; import com.baeldung.matrix.model.Company; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; im...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/controller/EmployeeController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/controller/EmployeeController.java
package com.baeldung.matrix.controller; import com.baeldung.matrix.model.Employee; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/model/Employee.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/model/Employee.java
package com.baeldung.matrix.model; import jakarta.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Employee { private long id; private String name; private String contactNumber; private String workingArea; public Employee() { super(); } public Employee(final lon...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/model/Company.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/model/Company.java
package com.baeldung.matrix.model; public class Company { private long id; private String name; public Company() { super(); } public Company(final long id, final String name) { this.id = id; this.name = name; } public String getName() { return name; }...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/config/MatrixWebConfig.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/matrix/config/MatrixWebConfig.java
package com.baeldung.matrix.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.util.UrlPathHelper; @Configuration pu...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/pathvariable.dottruncated/CustomWebMvcConfigurationSupport.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/pathvariable.dottruncated/CustomWebMvcConfigurationSupport.java
package com.baeldung.pathvariable.dottruncated; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; @Configuration public class CustomWebMvcConfig...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/pathvariable.dottruncated/SiteController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/pathvariable.dottruncated/SiteController.java
package com.baeldung.pathvariable.dottruncated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @Request...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/filters/EmptyParamFilter.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/filters/EmptyParamFilter.java
package com.baeldung.filters; import jakarta.servlet.Filter; import jakarta.servlet.FilterChain; import jakarta.servlet.FilterConfig; import jakarta.servlet.ServletException; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; import jakarta.servlet.annotation.WebFilter; import java.io.IOExc...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/multiparttesting/MultipartPostRequestController.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/multiparttesting/MultipartPostRequestController.java
package com.baeldung.multiparttesting; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; impo...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/listeners/AppListener.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/listeners/AppListener.java
package com.baeldung.listeners; import jakarta.servlet.ServletContext; import jakarta.servlet.ServletContextEvent; import jakarta.servlet.ServletContextListener; import jakarta.servlet.annotation.WebListener; @WebListener public class AppListener implements ServletContextListener { @Override public void cont...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/listeners/RequestListener.java
spring-web-modules/spring-mvc-java-2/src/main/java/com/baeldung/listeners/RequestListener.java
package com.baeldung.listeners; import jakarta.servlet.ServletContext; import jakarta.servlet.ServletRequestEvent; import jakarta.servlet.ServletRequestListener; import jakarta.servlet.annotation.WebListener; import jakarta.servlet.http.HttpServletRequest; @WebListener public class RequestListener implements ServletR...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/Consts.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/Consts.java
package com.baeldung; public interface Consts { int APPLICATION_PORT = 8080; }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/IMarshaller.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/IMarshaller.java
package com.baeldung.test; import java.util.List; public interface IMarshaller { <T> String encode(final T entity); <T> T decode(final String entityAsString, final Class<T> clazz); <T> List<T> decodeList(final String entitiesAsString, final Class<T> clazz); String getMime(); }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/TestMarshallerFactory.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/TestMarshallerFactory.java
package com.baeldung.test; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; @Component @Profile("...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/JacksonMarshaller.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/JacksonMarshaller.java
package com.baeldung.test; import java.io.IOException; import java.util.List; import com.baeldung.persistence.model.Foo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.Obje...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/XStreamMarshaller.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/test/XStreamMarshaller.java
package com.baeldung.test; import java.util.List; import com.baeldung.persistence.model.Foo; import org.springframework.http.MediaType; import com.google.common.base.Preconditions; import com.thoughtworks.xstream.XStream; public final class XStreamMarshaller implements IMarshaller { private XStream xstream; ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractDiscoverabilityLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractDiscoverabilityLiveTest.java
package com.baeldung.common.web; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.MatcherAssert.assertThat; import java.io.Seria...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractBasicLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractBasicLiveTest.java
package com.baeldung.common.web; import static com.baeldung.web.util.HTTPLinkHeaderUtil.extractURIByRel; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; import static org.assertj.core.api.Assertions.assertThat; import st...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/common/web/AbstractLiveTest.java
package com.baeldung.common.web; import io.restassured.RestAssured; import io.restassured.response.Response; import static com.baeldung.Consts.APPLICATION_PORT; import java.io.Serializable; import org.springframework.beans.factory.annotation.Autowired; import com.baeldung.test.IMarshaller; import com.google.common...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java
package com.baeldung.springhateoas; import static org.hamcrest.Matchers.is; import static org.mockito.BDDMockito.given; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.spri...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/spring/ConfigIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/spring/ConfigIntegrationTest.java
package com.baeldung.spring; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @ComponentScan("com.baeldung.test") public class ConfigIntegrationTest implem...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerAppIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerAppIntegrationTest.java
package com.baeldung.web; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.baeldung.persiste...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/GlobalExceptionHandlerIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/GlobalExceptionHandlerIntegrationTest.java
package com.baeldung.web; import com.baeldung.persistence.service.IFooService; import com.baeldung.web.controller.FooController; import com.baeldung.web.exception.CustomException3; import com.baeldung.web.exception.CustomException4; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.bea...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/StudentControllerIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/StudentControllerIntegrationTest.java
package com.baeldung.web; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.h...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/LiveTestSuiteLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/LiveTestSuiteLiveTest.java
package com.baeldung.web; import com.baeldung.web.FooDiscoverabilityLiveTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ // @formatter:off FooDiscoverabilityLiveTest.class, FooLiveTest.class, FooPageableLiveTest.class }) // public class Liv...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooMessageConvertersLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooMessageConvertersLiveTest.java
package com.baeldung.web; import static com.baeldung.Consts.APPLICATION_PORT; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertEquals; import static org.hamcrest.MatcherAssert.assertThat; import com.baeldu...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooPageableLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooPageableLiveTest.java
package com.baeldung.web; import static com.baeldung.Consts.APPLICATION_PORT; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertFalse; import sta...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooDiscoverabilityLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooDiscoverabilityLiveTest.java
package com.baeldung.web; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import com.baeldung.common.web.AbstractDiscoverabilityLiveTest; import com.baeldung.persistence.model.Foo; import com.baeldung.spring.ConfigIntegrationTest; import org.junit.runner.RunWith; import org.springframework....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerCustomEtagIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerCustomEtagIntegrationTest.java
package com.baeldung.web; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooLiveTest.java
package com.baeldung.web; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import org.junit.runner.RunWith; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRu...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerWebLayerIntegrationTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/FooControllerWebLayerIntegrationTest.java
package com.baeldung.web; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMa...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/util/HTTPLinkHeaderUtil.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/util/HTTPLinkHeaderUtil.java
package com.baeldung.web.util; public final class HTTPLinkHeaderUtil { private HTTPLinkHeaderUtil() { throw new AssertionError(); } // public static String extractURIByRel(final String linkHeader, final String rel) { if (linkHeader == null) { return null; } ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/error/ErrorHandlingLiveTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/web/error/ErrorHandlingLiveTest.java
package com.baeldung.web.error; import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.isA; import static org.hamcrest.Matchers.not; import static c...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/springpagination/PostDtoUnitTest.java
spring-web-modules/spring-boot-rest/src/test/java/com/baeldung/springpagination/PostDtoUnitTest.java
package com.baeldung.springpagination; import static org.junit.Assert.assertEquals; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import org.junit.Test; import org.modelmapper.ModelMapper; import com.baeldung.springpagination.dto.PostDto; import com.baeldung.springpagination.model.Post; ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/SpringBootRestApplication.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/SpringBootRestApplication.java
package com.baeldung; import org.modelmapper.ModelMapper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @SpringBootApplication public class SpringBootRestApplication { public static void ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/OrderService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/OrderService.java
package com.baeldung.services; import java.util.List; import com.baeldung.persistence.model.Order; public interface OrderService { List<Order> getAllOrdersForCustomer(String customerId); Order getOrderByIdForCustomer(String customerId, String orderId); }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/CustomerServiceImpl.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/CustomerServiceImpl.java
package com.baeldung.services; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.springframework.stereotype.Service; import com.baeldung.persistence.model.Customer; @Service public class CustomerServiceImpl implements CustomerService { private HashMap<String, Customer> cus...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/OrderServiceImpl.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/OrderServiceImpl.java
package com.baeldung.services; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.stereotype.Service; import com.baeldung.persistence.model.Customer; import com.baeldung.persistence.model.Order; @Service public class OrderServiceImpl impleme...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/CustomerService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/services/CustomerService.java
package com.baeldung.services; import java.util.List; import com.baeldung.persistence.model.Customer; public interface CustomerService { List<Customer> allCustomers(); Customer getCustomerDetail(final String id); }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/IOperations.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/IOperations.java
package com.baeldung.persistence; import java.io.Serializable; import java.util.List; import org.springframework.data.domain.Page; public interface IOperations<T extends Serializable> { // read - one T findById(final long id); // read - all List<T> findAll(); Page<T> findPaginated(int page, ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/dao/IFooDao.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/dao/IFooDao.java
package com.baeldung.persistence.dao; import org.springframework.data.jpa.repository.JpaRepository; import com.baeldung.persistence.model.Foo; public interface IFooDao extends JpaRepository<Foo, Long> { }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/IFooService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/IFooService.java
package com.baeldung.persistence.service; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.baeldung.persistence.IOperations; import com.baeldung.persistence.model.Foo; public interface IFooService extends IOperations<Foo> { Page<Foo> findPaginated(Page...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/impl/FooService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/impl/FooService.java
package com.baeldung.persistence.service.impl; import com.baeldung.persistence.dao.IFooDao; import com.baeldung.persistence.model.Foo; import com.baeldung.persistence.service.IFooService; import com.baeldung.persistence.service.common.AbstractService; import com.google.common.collect.Lists; import java.util.List; impo...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/common/AbstractService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/service/common/AbstractService.java
package com.baeldung.persistence.service.common; import java.io.Serializable; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.transaction.annotation.Transact...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Foo.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Foo.java
package com.baeldung.persistence.model; import java.io.Serializable; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.Version; import com.thoughtworks.x...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Customer.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Customer.java
package com.baeldung.persistence.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import org.springframework.hateoas.RepresentationModel; import java.util.Map; @JsonInclude(Include.NON_NULL) public class Customer extends RepresentationModel<Cust...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Order.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/model/Order.java
package com.baeldung.persistence.model; import org.springframework.hateoas.RepresentationModel; public class Order extends RepresentationModel<Order> { private String orderId; private double price; private int quantity; public Order() { super(); } public Order(final String orderId, f...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/config/CustomH2Dialect.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/persistence/config/CustomH2Dialect.java
package com.baeldung.persistence.config; import org.hibernate.dialect.H2Dialect; /** * Since H2 1.4.200. the behavior of the drop table commands has changed. * Tables are not dropped in a correct order. * Until this is properly fixed directly in Hibernate project, * let's use this custom H2Dialect class to solve ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/PersistenceConfig.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/PersistenceConfig.java
package com.baeldung.spring; import java.util.Properties; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configur...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/ConverterExtensionsConfig.java
package com.baeldung.spring; import org.springframework.context.annotation.Bean; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.xml.MarshallingHttpMessageConverter; import org.springframework.oxm.xstream.XStreamMarshaller; /** * Another possibility is to cre...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java
package com.baeldung.spring; import java.util.List; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.converter.HttpMessageConverter; import org.springfram...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/CustomerController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/CustomerController.java
package com.baeldung.web.controller; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.hateoas...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/FooController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/FooController.java
package com.baeldung.web.controller; import java.util.List; import jakarta.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/FaultyRestController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/FaultyRestController.java
package com.baeldung.web.controller; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class FaultyRestController { @GetMapping("/exception") public ResponseEntit...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/RootController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/RootController.java
package com.baeldung.web.controller; import java.net.URI; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import or...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/Student.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/Student.java
package com.baeldung.web.controller.students; public class Student { private long id; private String firstName; private String lastName; public Student() {} public Student(String firstName, String lastName) { super(); this.firstName = firstName; this.lastName ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/StudentService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/StudentService.java
package com.baeldung.web.controller.students; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; import java.util.stream.Collectors; import org.springframework.stereotype.Service; @Service public class StudentServic...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/StudentController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/controller/students/StudentController.java
package com.baeldung.web.controller.students; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springfr...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/util/RestPreconditions.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/util/RestPreconditions.java
package com.baeldung.web.util; import org.springframework.http.HttpStatus; import com.baeldung.web.exception.MyResourceNotFoundException; /** * Simple static methods to be called at the start of your own methods to verify correct arguments and state. If the Precondition fails, an {@link HttpStatus} code is thrown ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/util/LinkUtil.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/util/LinkUtil.java
package com.baeldung.web.util; import jakarta.servlet.http.HttpServletResponse; /** * Provides some constants and utility methods to build a Link Header to be stored in the {@link HttpServletResponse} object */ public final class LinkUtil { public static final String REL_COLLECTION = "collection"; public s...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/RestResponseEntityExceptionHandler.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/RestResponseEntityExceptionHandler.java
package com.baeldung.web.error; import com.baeldung.web.exception.MyResourceNotFoundException; import jakarta.persistence.EntityNotFoundException; import org.hibernate.exception.ConstraintViolationException; import org.springframework.dao.DataAccessException; import org.springframework.dao.DataIntegrityViolationExcept...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/CustomExceptionObject.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/CustomExceptionObject.java
package com.baeldung.web.error; public class CustomExceptionObject { private String message; public String getMessage() { return message; } public CustomExceptionObject setMessage(String message) { this.message = message; return this; } }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/RestResponseStatusExceptionResolver.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/RestResponseStatusExceptionResolver.java
package com.baeldung.web.error; import java.util.HashMap; import java.util.Map; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaT...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/MyGlobalExceptionHandler.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/error/MyGlobalExceptionHandler.java
package com.baeldung.web.error; import com.baeldung.web.exception.CustomException1; import com.baeldung.web.exception.CustomException2; import com.baeldung.web.exception.CustomException3; import com.baeldung.web.exception.CustomException4; import com.baeldung.web.exception.CustomException5; import org.springframework....
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException1.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException1.java
package com.baeldung.web.exception; public class CustomException1 extends RuntimeException { private static final long serialVersionUID = 1L; }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/ResourceNotFoundException.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/ResourceNotFoundException.java
package com.baeldung.web.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value = HttpStatus.NOT_FOUND) public class ResourceNotFoundException extends RuntimeException { }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException5.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException5.java
package com.baeldung.web.exception; import java.io.Serial; public class CustomException5 extends RuntimeException { @Serial private static final long serialVersionUID = 1L; public CustomException5(String message) { super(message); } }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/BadRequestException.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/BadRequestException.java
package com.baeldung.web.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value = HttpStatus.BAD_REQUEST) public class BadRequestException extends RuntimeException { }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException2.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException2.java
package com.baeldung.web.exception; public class CustomException2 extends RuntimeException { private static final long serialVersionUID = 1L; }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java
package com.baeldung.web.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value = HttpStatus.NOT_FOUND) public final class MyResourceNotFoundException extends RuntimeException { public MyResourceNotFoundException() { sup...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException4.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException4.java
package com.baeldung.web.exception; import java.io.Serial; public class CustomException4 extends RuntimeException { @Serial private static final long serialVersionUID = 1L; public CustomException4(String message) { super(message); } }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException3.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/exception/CustomException3.java
package com.baeldung.web.exception; import java.io.Serial; public class CustomException3 extends RuntimeException { @Serial private static final long serialVersionUID = 1L; }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/ResourceCreatedEvent.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/ResourceCreatedEvent.java
package com.baeldung.web.hateoas.event; import jakarta.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationEvent; public class ResourceCreatedEvent extends ApplicationEvent { private final HttpServletResponse response; private final long idOfNewResource; public ResourceCreate...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/PaginatedResultsRetrievedEvent.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/PaginatedResultsRetrievedEvent.java
package com.baeldung.web.hateoas.event; import java.io.Serializable; import jakarta.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationEvent; import org.springframework.web.util.UriComponentsBuilder; /** * Event that is fired when a paginated search is performed. * <p/> * This event ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/SingleResourceRetrievedEvent.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/event/SingleResourceRetrievedEvent.java
package com.baeldung.web.hateoas.event; import jakarta.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationEvent; public class SingleResourceRetrievedEvent extends ApplicationEvent { private final HttpServletResponse response; public SingleResourceRetrievedEvent(final Object sour...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/SingleResourceRetrievedDiscoverabilityListener.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/SingleResourceRetrievedDiscoverabilityListener.java
package com.baeldung.web.hateoas.listener; import jakarta.servlet.http.HttpServletResponse; import com.baeldung.web.hateoas.event.SingleResourceRetrievedEvent; import com.baeldung.web.util.LinkUtil; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; import org.spr...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/PaginatedResultsRetrievedDiscoverabilityListener.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/PaginatedResultsRetrievedDiscoverabilityListener.java
package com.baeldung.web.hateoas.listener; import java.util.StringJoiner; import jakarta.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; import org.springframework.web.util.UriComponentsBuilder; import com.baeldung.web.hateoa...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/ResourceCreatedDiscoverabilityListener.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/hateoas/listener/ResourceCreatedDiscoverabilityListener.java
package com.baeldung.web.hateoas.listener; import com.baeldung.web.hateoas.event.ResourceCreatedEvent; import com.google.common.base.Preconditions; import java.net.URI; import jakarta.servlet.http.HttpServletResponse; import org.apache.http.HttpHeaders; import org.springframework.context.ApplicationListener; import or...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/config/MyCustomErrorAttributes.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/config/MyCustomErrorAttributes.java
package com.baeldung.web.config; import java.util.Map; import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; import org.springframework.stereotype.Component; import org.springframework.web.context.request.WebRequest; @Component publ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/config/MyErrorController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/web/config/MyErrorController.java
package com.baeldung.web.config; import java.util.Map; import jakarta.servlet.http.HttpServletRequest; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController; import org.springframework.boot.web.servlet.error.ErrorAttri...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/controller/PostRestController.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/controller/PostRestController.java
package com.baeldung.springpagination.controller; import com.baeldung.springpagination.dto.PostDto; import com.baeldung.springpagination.model.Post; import com.baeldung.springpagination.service.IPostService; import com.baeldung.springpagination.service.IUserService; import org.modelmapper.ModelMapper; import org.sprin...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/dto/PostDto.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/dto/PostDto.java
package com.baeldung.springpagination.dto; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class PostDto { private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); private Long id; private S...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/dto/UserDto.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/dto/UserDto.java
package com.baeldung.springpagination.dto; public class UserDto { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/service/UserService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/service/UserService.java
package com.baeldung.springpagination.service; import org.springframework.stereotype.Service; import com.baeldung.springpagination.model.Preference; import com.baeldung.springpagination.model.User; @Service public class UserService implements IUserService { @Override public User getCurrentUser() { ...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false
eugenp/tutorials
https://github.com/eugenp/tutorials/blob/4463e58ffb73fe599bac2479abd84598c6e70a1a/spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/service/IPostService.java
spring-web-modules/spring-boot-rest/src/main/java/com/baeldung/springpagination/service/IPostService.java
package com.baeldung.springpagination.service; import java.util.List; import com.baeldung.springpagination.model.Post; public interface IPostService { List<Post> getPostsList(int page, int size, String sortDir, String sort); void updatePost(Post post); Post createPost(Post post); Post getPostById...
java
MIT
4463e58ffb73fe599bac2479abd84598c6e70a1a
2026-01-04T14:45:57.069771Z
false