@Validated 기능 사용 시 Spring의 AOP Proxy 동과 관련되어 AService 클래스내에 @Autowired BService bService가 null 해결 방법

@Validated
@Service
class AService {
	@Autowired
    private BService bService;
    
    private Test getTest() {
    	// bService null인 상황일때
    }
}





@ActiveProfiles({ Application.ACTIVE_PROFILE_TEST_CASE })
@SpringBootTest
@ExtendWith(SpringExtension.class)
@TestMethodOrder(MethodOrderer.Alphanumeric.class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Slf4j
class TestCase {
    @MockBean
    private BService bService;

    @Autowired
    private AService aService;

    @Test
    void test() {
        ...
        BService bService = new BService();
        Mockito.when(bService.get1("1")).thenReturn(new Test());
        ...

        ReflectionTestUtils.invokeMethod(AopTestUtils.getTargetObject(aService), AService.class, , "getTest");
    }
}
  1. Double Commander
  2. Sublime Text
  3.  Spectacle
    • 화면 캡쳐 : 윈도우 픽픽 같아 아주 좋음, 그놈 기본은 강조 표시 등 간단한 수정이 안되어 불편
    • Wayland, KDE이슈로 안되면 대안
      • Deepin
      • Flameshot (Fedora 41Wayland 이제 잘 되네, 2024.11.26)
        • 단축키 지정시 안되면 맨 아래 확인
  4. GIMP (GNU Image Manipulation Program, 그누 이미지 처리 프로그램)
    • 이미지 편집
  5. Shotcut
    • 동영상 편집
  6. Color Picker
    • 화면에서 RGB 색상 알아내기
  7. KRuler
    • 줄자
  8. Studtio 3T Linux
  9. Fleet
  10. DataGrip
  11. Sublime Merge
    • git remote 관리 편함(tag 삭제 등)

 

## Flameshot 단축키 지정시 안되면
dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.SetPermission string:'screenshot' boolean:true string:'screenshot' string:'flameshot' array:string:'yes'

dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.Lookup string:'screenshot' string:'screenshot'

 

Class에 선언되지 않은 필드 정보가 넘어옴(columns 필드 선언되지 않음)

org.jboss.resteasy.spi.ReaderException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "columns"

...
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "columns"

무시하려면

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class .....

+ Recent posts