Spring

Spring security Version 3.1 - Need to match user using either userPrincipalName without domain added OR sAMAccountName (search filter ?)

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 17:51:07
问题 All, Our IT dept has decided to change the suffix of our users in AD by adding a different suffix to the userPrincipalName in AD to the actual domain being used. e.g. our domain is xxx.com but userPrincipalName is now "usera@zzz.tech" whereas before it was "usera@xxx.com". The Spring LDAP AD authentication no longer works with this because of this reason I think: userPrincipalName is built up using name + domain when it tries to authenticate. I need to override this somehow - but keep with

Spring security Version 3.1 - Need to match user using either userPrincipalName without domain added OR sAMAccountName (search filter ?)

偶尔善良 提交于 2021-02-11 17:51:05
问题 All, Our IT dept has decided to change the suffix of our users in AD by adding a different suffix to the userPrincipalName in AD to the actual domain being used. e.g. our domain is xxx.com but userPrincipalName is now "usera@zzz.tech" whereas before it was "usera@xxx.com". The Spring LDAP AD authentication no longer works with this because of this reason I think: userPrincipalName is built up using name + domain when it tries to authenticate. I need to override this somehow - but keep with

Mocking an Aspect class invoked after an exception is thrown in Junit

為{幸葍}努か 提交于 2021-02-11 17:42:07
问题 I have an aspect class as below - public class TestAspect { @AfterThrowing(pointcut = "execution(* *(..)) ", throwing = "testException") public void afterThrowAdvice(TestException testException) throws Exception { } } Now anytime any class throws TestException, TestAspect's afterThrowAdvice method is getting called. From Unit tests as well without using any spring configuration xmls, running as a plain junit test. How do I mock to not do anything when that method is called? I tried in my unit

Java WebClient losing intermittent responses when load increases

只谈情不闲聊 提交于 2021-02-11 17:19:24
问题 I'm developing a credit card charging server for a hotel booking system that can either be used manually through a web UI or automatically for non-refundable bookings. Each transaction goes through a proxy service (third party cc store, PCI Booking) and from there to the actual payment provider. I then save the responses (Success, card declined, etc), the provider name and the time it took to charge. When I charge manually, everything works fine but when there are several automatic requests

Two Modules exports the same package (Spring)

佐手、 提交于 2021-02-11 15:48:34
问题 I get this error when I try run my project. After many hours of search I found out why this happens, but I have no idea how to exclude one from exporting the package. java.lang.module.ResolutionException: Modules spring.aop and aopalliance export package org.aopalliance.intercept to module spring.beans It is my first time with Spring in general (I need JPA for CRUD I'm working now with Hibernate). I used Intellij IDEA's "Add Framework..." function in order to add Spring Data JPA. My Maven pom

Two Modules exports the same package (Spring)

倖福魔咒の 提交于 2021-02-11 15:46:43
问题 I get this error when I try run my project. After many hours of search I found out why this happens, but I have no idea how to exclude one from exporting the package. java.lang.module.ResolutionException: Modules spring.aop and aopalliance export package org.aopalliance.intercept to module spring.beans It is my first time with Spring in general (I need JPA for CRUD I'm working now with Hibernate). I used Intellij IDEA's "Add Framework..." function in order to add Spring Data JPA. My Maven pom

How can I make Springboot-annotated classes load properly when they are in a library?

依然范特西╮ 提交于 2021-02-11 15:45:50
问题 I have a working Spring Boot application which includes a class like this: @RestController @Validated @RequestMapping("/HelloWorld") public class HelloWorldController { private static int foo = getFoo (); private static int getFoo () { System.out.println ("HelloWorldController getFoo"); return 0; } public HelloWorldController () { System.out.println ("HelloWorldController Constructor"); } @GetMapping("/get") public HelloWorld root () { return new HelloWorld ("Hello, world!"); } } The /get

cannot connect to mongodb container host

泄露秘密 提交于 2021-02-11 15:43:50
问题 im trying to connect to a mongodb container, but it does not work, does not recognize the host. this is my docker-compose.yml file with the service: version: '3' services: mongodb: build: context: . dockerfile: docker/mongodb/Dockerfile restart: always environment: DATABASE: database USERNAME: user PASSWORD: pass ports: - '5100:27017' volumes: - ./data/db:/data/db This is my dockerfile for mongodb: FROM mvertes/alpine-mongo:4.0.5-0 ENV MONGO_INITDB_DATABASE: ${DATABASE} ENV MONGO_INITDB_ROOT

how to autoscale the spring batch application in openshift?

喜欢而已 提交于 2021-02-11 15:42:14
问题 I have a spring batch application which will trigger the job to transfer bulk data from one database to another database through API call.All jobs are configured to work in parallel processing(Master/slave step)partition and deployed this application in openshift. Need to autoscale the application based on the load during the job execution.Even though i have used the openshift autoscale feature still i couldn't find the efficiency in performance of the job. PODs are simply creating but only

Cannot start a Tomcat v9.0 server in eclipse

假如想象 提交于 2021-02-11 15:40:29
问题 I have a problem starting my first Java Spring application, when simply trying to run my project, im given the following error: Apr 19, 2020 9:41:31 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name: Apache Tomcat/9.0.34 Apr 19, 2020 9:41:31 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Apr 3 2020 12:02:52 UTC Apr 19, 2020 9:41:31 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 9.0.34.0 Apr