From 480d9fb405f894daadf6dee77aae054ad8058344 Mon Sep 17 00:00:00 2001 From: HarisHashim Date: Wed, 26 Jan 2022 09:28:57 +0800 Subject: [PATCH 01/13] BAEL-5204: Change the font color of a cell with Apache POI (#11554) * BAEL-5204: First commit "Change the font color of a cell with Apache POI" * BAEL-5204: Create class and unit test * BAEL-5204: finalize unit test * BAEL-5204: fix indent * BAEL-5204: add missing excel template --- .../poi/excel/cellstyle/CellStyler.java | 26 +++++++++ .../poi/excel/cellstyle/CellStyle.xlsx | Bin 0 -> 8393 bytes .../excel/cellstyle/CellStylerUnitTest.java | 52 ++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 apache-poi/src/main/java/com/baeldung/poi/excel/cellstyle/CellStyler.java create mode 100644 apache-poi/src/main/resources/com/baeldung/poi/excel/cellstyle/CellStyle.xlsx create mode 100644 apache-poi/src/test/java/com/baeldung/poi/excel/cellstyle/CellStylerUnitTest.java diff --git a/apache-poi/src/main/java/com/baeldung/poi/excel/cellstyle/CellStyler.java b/apache-poi/src/main/java/com/baeldung/poi/excel/cellstyle/CellStyler.java new file mode 100644 index 0000000000..6d8b303fd3 --- /dev/null +++ b/apache-poi/src/main/java/com/baeldung/poi/excel/cellstyle/CellStyler.java @@ -0,0 +1,26 @@ +package com.baeldung.poi.excel.cellstyle; + +import org.apache.poi.hssf.util.HSSFColor.HSSFColorPredefined; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.usermodel.Workbook; + +public class CellStyler { + public CellStyle createWarningColor(Workbook workbook) { + CellStyle style = workbook.createCellStyle(); + + Font font = workbook.createFont(); + font.setFontName("Courier New"); + font.setBold(true); + font.setUnderline(Font.U_SINGLE); + font.setColor(HSSFColorPredefined.DARK_RED.getIndex()); + style.setFont(font); + + style.setAlignment(HorizontalAlignment.CENTER); + style.setVerticalAlignment(VerticalAlignment.CENTER); + return style; + } +} diff --git a/apache-poi/src/main/resources/com/baeldung/poi/excel/cellstyle/CellStyle.xlsx b/apache-poi/src/main/resources/com/baeldung/poi/excel/cellstyle/CellStyle.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..ca9394246a706801c2db17a2ab89446c69fe505b GIT binary patch literal 8393 zcmeHMgRd^f#c?DzTqMTE&!6T1GF=*bGf51+V7L z_UnKa`uNHa zX*9cDWhlLKV`}1=G%>%k0FFp($Ayn9qP4ygpito@t$iJHQm)^ZXvf;&Z{Y9S!4w~R zqJGuFPh@S({v=N#ggSJ58lY|$TYs;L+YuJfD^66XJao`a1^-6BOhDedNM_NJmyl?o zdY{IDZK=3FPeu(Qz!Dl*IxyHI*r~Q_PVVnmGKRi}^6=u8@C>xsa@;8e9PFf~3y9oZ z8rT%}+ZkPd61I1kz8S=Qg9ZTH-Xa6k|3*uwHkkGVfi-0W>#z{CG&^Q{5uvlZUTSbRcZ+6J$xh>R;24|Em=*K}Ez%H>{==j7?+S(col50htm z0!u|x*(;^NMOxWUhcY!l7{_B$OoC$ahzzA{0Ho*PcKQeHLW2w)n<9FLNq?c7WSRTGC3Ut-~HKD zUkqr_@Zw)^!{qwuU!Df(*Yh3@<@)prVD?lD91MoWQkE?s6zZQO5l4GNat9dzI73hf z4>2>|_MBc$u6AZlPIf#_zks&9=T2Y)Ckt8P#Y?W_*XnAmxp{n$j0#ZUuFy8W(l z6=YbYtC`&rXeNTK$igx~O?O3m-?o`B4n}CFXf%T>q%g>MMR zfkzA|Iq>`b*vxl%JBT?VIV(>NQYs@jb$i(FcNxplQdQ}&VxsJ)SRZ0F0#$I+rH-~$ zTPUiwjqBaBk_S>IrhPcrV4A$4uk??1(GL^_PU}JVm8OJ|w1mn=YyNLc0nOsc>Dw{- zft4&+8h#}=+IrCG{_r~>KjLdOTHeT6B+L-uQH}J`a7byx0V%sCuTm{Z2kc(zP}^&r zEQiYRP{ow7Y^mZ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S*R_$yYn?zRKDq_b zw!DN-IB`s_od#JV*YYNY@sWBm!`^x#GLxQ-It}uumgUdA2U^cUg=+V8^ck`7qw6jF zT=s0S7|>d;|Fu?>O#S7HHsTu_1XDqX&98-%xw@;9vm2+mldI()ryT#?^CFhfKlzbe zH<&Pd5&at;{XU<9hmcfNHO`@Fw+T`If|ToIH3N=9!&Zl}K2($cEc1n1#|t+FvAJ!Q z%R3v|4kb~z7>b=y`Yd(11=`gB_8IvqT z2s~pvsdXc2h=oVz@d|omTr`D;rA1oU8w~sp*q7oGxjqA%)10XE8U?|`_B*qCbq5s_Vm?~fbqY+pHA@*9pzhcqU+4;XvL`>Nq?M1Sr z6GA-0_mQtCvEgJ8xH@)7rJ4NWlWJ3>~Mn}kdyz1nJ&I8}uY zE)HD0l(8!(8&lirA}-ReO6wqI_GK4=)k|qFVq-QNOpI#_3pvtWG}_udkK{w&?(;^W zUqsuY_*h;4+=T?XWiuI8oQdTgut3`KGxaMh3xRt+rtG6A7(Ugyv*4$@{vP)FeZ84k)Q77(i)E4mU>d33f;|{RM z&FV?d>5=cFK#og8D<1mAo7x+!KjDjXhaC~*|NYST&*l1a{FftSb)~;M`1|qJpN2oi z3Oob3-KEyP-{jTJ{d-%Ja v{;~%Ez9KyQLtTG2|9c4htGPSbU(Ejqi0VqHh}8uE?jl~n2m$Az_;K|=SI=Sd literal 0 HcmV?d00001 diff --git a/apache-poi/src/test/java/com/baeldung/poi/excel/cellstyle/CellStylerUnitTest.java b/apache-poi/src/test/java/com/baeldung/poi/excel/cellstyle/CellStylerUnitTest.java new file mode 100644 index 0000000000..074e51919a --- /dev/null +++ b/apache-poi/src/test/java/com/baeldung/poi/excel/cellstyle/CellStylerUnitTest.java @@ -0,0 +1,52 @@ +package com.baeldung.poi.excel.cellstyle; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Paths; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.junit.Before; +import org.junit.Test; + +public class CellStylerUnitTest { + private static String FILE_NAME = "com/baeldung/poi/excel/cellstyle/CellStyle.xlsx"; + private static final String NEW_FILE_NAME = "CellStyleTest_output.xlsx"; + private String fileLocation; + + @Before + public void setup() throws IOException, URISyntaxException { + fileLocation = Paths.get(ClassLoader.getSystemResource(FILE_NAME) + .toURI()) + .toString(); + } + + @Test + public void testApplyWarningColor() throws IOException { + Workbook workbook = new XSSFWorkbook(fileLocation); + Sheet sheet = workbook.getSheetAt(0); + Row row1 = sheet.createRow(0); + row1.setHeightInPoints((short) 40); + + CellStyler styler = new CellStyler(); + CellStyle style = styler.createWarningColor(workbook); + + Cell cell1 = row1.createCell(0); + cell1.setCellStyle(style); + cell1.setCellValue("Hello"); + + Cell cell2 = row1.createCell(1); + cell2.setCellStyle(style); + cell2.setCellValue("world!"); + + FileOutputStream outputStream = new FileOutputStream(NEW_FILE_NAME); + workbook.write(outputStream); + outputStream.close(); + workbook.close(); + } +} From a5defe6121e639ccc79a96d15d8f365acd7b87b2 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:26:50 +0800 Subject: [PATCH 02/13] Update README.md --- core-java-modules/core-java-security-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-security-3/README.md b/core-java-modules/core-java-security-3/README.md index 30cfd8a947..8623fa5aa8 100644 --- a/core-java-modules/core-java-security-3/README.md +++ b/core-java-modules/core-java-security-3/README.md @@ -8,4 +8,5 @@ This module contains articles about core Java Security - [Enabling Unlimited Strength Cryptography in Java](https://www.baeldung.com/jce-enable-unlimited-strength) - [Initialization Vector for Encryption](https://www.baeldung.com/java-encryption-iv) - [HMAC in Java](https://www.baeldung.com/java-hmac) +- [Generating a Secure AES Key in Java](https://www.baeldung.com/java-secure-aes-key) - More articles: [[<-- prev]](/core-java-modules/core-java-security-2) From 34e7cc8112a2328c16ccc0a1542e7dfefd9eec52 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:31:09 +0800 Subject: [PATCH 03/13] Update README.md --- java-collections-maps-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/java-collections-maps-3/README.md b/java-collections-maps-3/README.md index 87817331b5..75842c85a4 100644 --- a/java-collections-maps-3/README.md +++ b/java-collections-maps-3/README.md @@ -6,3 +6,4 @@ - [Optimizing HashMap’s Performance](https://www.baeldung.com/java-hashmap-optimize-performance) - [Update the Value Associated With a Key in a HashMap](https://www.baeldung.com/java-hashmap-update-value-by-key) - [Java Map – keySet() vs. entrySet() vs. values() Methods](https://www.baeldung.com/java-map-entries-methods) +- [Java IdentityHashMap Class and Its Use Cases](https://www.baeldung.com/java-identityhashmap) From af7c764ce9499eed8ca1536087bad3b4658bc57e Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:35:42 +0800 Subject: [PATCH 04/13] Update README.md --- core-java-modules/core-java-lang-oop-constructors/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-oop-constructors/README.md b/core-java-modules/core-java-lang-oop-constructors/README.md index 6083f1d0df..ddd0ec6afb 100644 --- a/core-java-modules/core-java-lang-oop-constructors/README.md +++ b/core-java-modules/core-java-lang-oop-constructors/README.md @@ -10,3 +10,4 @@ This module contains article about constructors in Java - [Throwing Exceptions in Constructors](https://www.baeldung.com/java-constructors-exceptions) - [Constructors in Java Abstract Classes](https://www.baeldung.com/java-abstract-classes-constructors) - [Java Implicit Super Constructor is Undefined Error](https://www.baeldung.com/java-implicit-super-constructor-is-undefined-error) +- [Constructor Specification in Java](https://www.baeldung.com/java-constructor-specification) From 85c929b74bab6bf63e7ef5e129ca8cefcd811fee Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:38:14 +0800 Subject: [PATCH 05/13] Update README.md --- persistence-modules/spring-data-jpa-repo-2/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/persistence-modules/spring-data-jpa-repo-2/README.md b/persistence-modules/spring-data-jpa-repo-2/README.md index be5bab1b56..6403510e6f 100644 --- a/persistence-modules/spring-data-jpa-repo-2/README.md +++ b/persistence-modules/spring-data-jpa-repo-2/README.md @@ -1,7 +1,9 @@ ## Spring Data JPA - Repositories ### Relevant Articles: + - [Introduction to Spring Data JPA](https://www.baeldung.com/the-persistence-layer-with-spring-data-jpa) - [Performance Difference Between save() and saveAll() in Spring Data](https://www.baeldung.com/spring-data-save-saveall) - [LIKE Queries in Spring JPA Repositories](https://www.baeldung.com/spring-jpa-like-queries) +- [How to Access EntityManager with Spring Data](https://www.baeldung.com/spring-data-entitymanager) - More articles: [[<-- prev]](../spring-data-jpa-repo) From f1bdc807b55af870efa4d99e7f2fb6569c9d00ea Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:39:48 +0800 Subject: [PATCH 06/13] Update README.md --- core-java-modules/core-java-concurrency-collections-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-concurrency-collections-2/README.md b/core-java-modules/core-java-concurrency-collections-2/README.md index 6ad6529efc..692c218395 100644 --- a/core-java-modules/core-java-concurrency-collections-2/README.md +++ b/core-java-modules/core-java-concurrency-collections-2/README.md @@ -2,4 +2,5 @@ - [Introduction to Lock Striping](https://www.baeldung.com/java-lock-stripping) - [Guide to the Java TransferQueue](http://www.baeldung.com/java-transfer-queue) +- [Java Concurrent HashSet Equivalent to ConcurrentHashMap](https://www.baeldung.com/java-concurrent-hashset-concurrenthashmap) - [[<-- Prev]](/core-java-modules/core-java-concurrency-collections) From f92a336512c6c676b0c602fba0ad65a5c0c7d762 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:41:44 +0800 Subject: [PATCH 07/13] Update README.md --- core-java-modules/core-java-jndi/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-jndi/README.md b/core-java-modules/core-java-jndi/README.md index b0b23fc0d0..9c6f489841 100644 --- a/core-java-modules/core-java-jndi/README.md +++ b/core-java-modules/core-java-jndi/README.md @@ -3,3 +3,4 @@ - [Java Naming and Directory Interface Overview](https://www.baeldung.com/jndi) - [LDAP Authentication Using Pure Java](https://www.baeldung.com/java-ldap-auth) +- [Testing LDAP Connections With Java](https://www.baeldung.com/java-test-ldap-connections) From 3874415836e757b78b4ebc3986903d5268326caa Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:45:09 +0800 Subject: [PATCH 08/13] Update README.md --- core-java-modules/core-java-nio-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-nio-2/README.md b/core-java-modules/core-java-nio-2/README.md index 52efa0330a..9152a494d8 100644 --- a/core-java-modules/core-java-nio-2/README.md +++ b/core-java-modules/core-java-nio-2/README.md @@ -11,4 +11,5 @@ This module contains articles about core Java non-blocking input and output (IO) - [How to Lock a File in Java](https://www.baeldung.com/java-lock-files) - [Java NIO DatagramChannel](https://www.baeldung.com/java-nio-datagramchannel) - [Java – Path vs File](https://www.baeldung.com/java-path-vs-file) +- [What Is the Difference Between NIO and NIO.2?](https://www.baeldung.com/java-nio-vs-nio-2) - [[<-- Prev]](/core-java-modules/core-java-nio) From 61030e497fa37630bfd9fe58547bfd5e6f69a18e Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:47:15 +0800 Subject: [PATCH 09/13] Update README.md --- javafx/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javafx/README.md b/javafx/README.md index 8ef06eb012..5e034adb38 100644 --- a/javafx/README.md +++ b/javafx/README.md @@ -3,6 +3,8 @@ This module contains articles about JavaFX. ### Relevant Articles: + - [Introduction to JavaFX](https://www.baeldung.com/javafx) - [Display Custom Items in JavaFX ListView](https://www.baeldung.com/javafx-listview-display-custom-items) +- [Adding EventHandler to JavaFX Button](https://www.baeldung.com/javafx-button-eventhandler) From 2b6ef895558923377f8d2f5e333f26d8ba5aeca3 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:48:52 +0800 Subject: [PATCH 10/13] Update README.md --- core-java-modules/core-java-security-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-security-3/README.md b/core-java-modules/core-java-security-3/README.md index 8623fa5aa8..31969cd270 100644 --- a/core-java-modules/core-java-security-3/README.md +++ b/core-java-modules/core-java-security-3/README.md @@ -9,4 +9,5 @@ This module contains articles about core Java Security - [Initialization Vector for Encryption](https://www.baeldung.com/java-encryption-iv) - [HMAC in Java](https://www.baeldung.com/java-hmac) - [Generating a Secure AES Key in Java](https://www.baeldung.com/java-secure-aes-key) +- [Computing an X509 Certificate’s Thumbprint in Java](https://www.baeldung.com/java-x509-certificate-thumbprint) - More articles: [[<-- prev]](/core-java-modules/core-java-security-2) From 21316676200ddea1dc5a835b25e5aa7612807f45 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 17:59:31 +0800 Subject: [PATCH 11/13] Update README.md --- spring-cloud/spring-cloud-gateway/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-cloud/spring-cloud-gateway/README.md b/spring-cloud/spring-cloud-gateway/README.md index 90e81fe9a2..6b199977e3 100644 --- a/spring-cloud/spring-cloud-gateway/README.md +++ b/spring-cloud/spring-cloud-gateway/README.md @@ -3,7 +3,9 @@ This module contains articles about Spring Cloud Gateway ### Relevant Articles: + - [Exploring the new Spring Cloud Gateway](http://www.baeldung.com/spring-cloud-gateway) - [Writing Custom Spring Cloud Gateway Filters](https://www.baeldung.com/spring-cloud-custom-gateway-filters) - [Spring Cloud Gateway Routing Predicate Factories](https://www.baeldung.com/spring-cloud-gateway-routing-predicate-factories) - [Spring Cloud Gateway WebFilter Factories](https://www.baeldung.com/spring-cloud-gateway-webfilter-factories) +- [Using Spring Cloud Gateway with OAuth 2.0 Patterns](https://www.baeldung.com/spring-cloud-gateway-oauth2) From 7aaf834ff862c1248c765129fe89dfaca38edb9c Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Wed, 26 Jan 2022 18:02:03 +0800 Subject: [PATCH 12/13] Update README.md --- apache-poi/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apache-poi/README.md b/apache-poi/README.md index 34e7631087..ed30d9a4f3 100644 --- a/apache-poi/README.md +++ b/apache-poi/README.md @@ -14,4 +14,5 @@ This module contains articles about Apache POI. - [Set Background Color of a Cell with Apache POI](https://www.baeldung.com/apache-poi-background-color) - [Add Borders to Excel Cells With Apache POI](https://www.baeldung.com/apache-poi-add-borders) - [Reading Values From Excel in Java](https://www.baeldung.com/java-read-dates-excel) +- [Change Cell Font Style with Apache POI](https://www.baeldung.com/apache-poi-change-cell-font) - More articles: [[next -->]](../apache-poi-2) From 57f91f9948a4350e851e42eba42638ccb8139daa Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Thu, 27 Jan 2022 10:15:16 +0100 Subject: [PATCH 13/13] JAVA-9605: Disable security for the integration tests --- .../secondservice/SecondServiceIntegrationTest.java | 4 +++- .../customfilters/service/ServiceIntegrationTest.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/secondservice/SecondServiceIntegrationTest.java b/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/secondservice/SecondServiceIntegrationTest.java index 6b2a432d20..f4b3d0f00d 100644 --- a/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/secondservice/SecondServiceIntegrationTest.java +++ b/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/secondservice/SecondServiceIntegrationTest.java @@ -2,12 +2,14 @@ package com.baeldung.springcloudgateway.customfilters.secondservice; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.test.web.reactive.server.WebTestClient; import com.baeldung.springcloudgateway.customfilters.secondservice.web.SecondServiceRestController; -@WebFluxTest(SecondServiceRestController.class) +@WebFluxTest(controllers = SecondServiceRestController.class, + excludeAutoConfiguration = ReactiveSecurityAutoConfiguration.class) public class SecondServiceIntegrationTest { @Autowired diff --git a/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/service/ServiceIntegrationTest.java b/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/service/ServiceIntegrationTest.java index bfb3f23f0d..9990cd003c 100644 --- a/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/service/ServiceIntegrationTest.java +++ b/spring-cloud/spring-cloud-gateway/src/test/java/com/baeldung/springcloudgateway/customfilters/service/ServiceIntegrationTest.java @@ -2,13 +2,15 @@ package com.baeldung.springcloudgateway.customfilters.service; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.http.HttpHeaders; import org.springframework.test.web.reactive.server.WebTestClient; import com.baeldung.springcloudgateway.customfilters.service.web.ServiceRestController; -@WebFluxTest(ServiceRestController.class) +@WebFluxTest(controllers = ServiceRestController.class, + excludeAutoConfiguration = ReactiveSecurityAutoConfiguration.class) public class ServiceIntegrationTest { @Autowired