[컴] windows 10 의 AarSvc_xxxx 서비스 끄는 방법

 

stop / turn off / service / 윈10 / 윈도우즈 / 윈도우 10

windows 10 의 AarSvc_xxxx 서비스 끄는 방법

아래 링크에 잘 나와있다. 이 서비스는 ‘코타나(Cortana)’ 와 같은 개인 digital Assistant 관련 서비스라고 한다. 개인적으로 사용할 일이 없어서 꺼놓으려 한다.

위 링크에 나와있는 내용인데, 아래 command 로 disable 이 가능하다. 참고로, 관리자(administrator) 계정으로 실행한 powershell 이어야 한다.

Set-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AarSvc*" -Name "Start" -Value 4

[컴] 소니의 모션캡쳐 제품, 목피

 

MOTHION CAPTURE / motion capturing / sony /

소니의 모션캡쳐 제품, 목피

소니에서 모션캡쳐를 쉽게 할 수 있는 기기를 내놨다. ‘목피(mocpi)’ 라고 부르는 듯 하다.

현재도 기술은 많이 밥발달해서 카메라만으로도 많은 모션을 인식할 수 있지만, 아직 자세한 모션은 몸에 센서를 달아서 인식하는 모션캡쳐를 사용해서 동작을 만들어낸다.

보통 엄청많은 센서를 몸에 부착해서 모션을 만들어내는데, 이번 소니의 제품은 최소한의 센서를 이용한듯 보인다. 품질이 얼마나 차이가 날지는 알 수 없으나, 훨씬 다양한 3D 캐릭터를 훨씬 쉽게 만들어낼 상황이 되어가는 듯 보인다.

[컴] git 에서 local 에서만 쓸 용도로 파일을 수정하는 경우 관리방법

git 에서 설정값 처리 / 개발 편의 / dev / 깃 / 편하게 개발 / 노하우 / localbuild /git test / git 테스트용 / test용

git 에서 local 에서만 쓸 용도로 파일을 수정하는 경우 관리방법

아래 링크에서 좋은 방법을 제시해 준다.

간략적으로 정리하면, 예를 들어 특정 build 와 연관된 .properties를 수정했다고 하자.

  1. branch 를 하나 만들고,
  2. 그 branch 에 local change 를 반영하고, commit한다.
  3. 그리고 작업은 에서 계속하고,
  4. 필요한 순간이 오면, 그 branch 로 옮겨가서
  5. git rebase <working_branch>git merge <working_branch> 를 하고,
  6. build 를 수행한다.

참고로 이것은 다른 branch 에서 작업할 때도 가능할 듯 하다.

사용법

개인적으로 다음처럼 script 를 만들어서 사용중이다.(이 스크립트를 gclocal.bat 라고 하자.) feature/myfeature에서 commit 만 하고, lbuild로 가서 작업을 한다. 그리고 수정을 하고, stage 로 둔후에, feature/myfeature 로 와서 commit 을 하고, gclocal.bat 를 실행해서 lbuild로 돌아온다.

git checkout lbuild

git merge feature/myfeature

git branch

local 의 commit 중 push 되지 않은 commit 을 찾는법

git log --branches --not --remotes

[컴][보안] browser 의 autofill(자동완성) 을 꺼야하는 이유

크롬 자동완성 끄는 법 / chrome off autofill / security /브라우저 보안 강화

browser 의 autofill(자동완성) 을 꺼야하는 이유

아래 링크의 영상이 잘 알려준다.

  • https://twitter.com/anttiviljami/status/816585860661518336

자동완성은 눈에 안보이지만, 만약 input form 이 존재한다면, 자동으로 채워져서 server로 날라가게 된다. 그것이 우리가 원하지 않은 정보를 노출시키게 된다.

크롬 autofill 끄는 법

  • 크롬: menu –> settings –> 자동완성
    • --> 비밀번호 관리자 –> 비밀번호 저장 여부 확인 off –> 자동로그인 off
    • --> 결제 수단 –> 결제 수단 저장 및 자동 입력 off –> 사이트에서 저장된 결제 수단이 있는지 확인하도록 허용 off
    • --> 주소 및 기타 –> 주소 저장 및 자동 입력 off

See Also

  1. 쿠…sal: [컴][웹] firefox 에서 보안설정 간편하게 하기
  2. 쿠…sal: [컴][웹] firefox 보안 관련 설정
  3. 쿠…sal: [컴][웹] chrome 에서 보안 강화

[컴][웹] spring boot 에서 Constructor Dependency Injection(CDI)

autowired 가 없이 자동으로 / argument 에 parameter 에 autowired 가 없는 경우

spring boot 에서 Constructor Dependency Injection(CDI)

대체로 ref. 3 에서 잘 정리된 듯 하다. 여기서는 constructor 에 @Autowired 가 없는 경우, 그리고 argument 가 어디에서도 명시적으로(explicitly) instantiated 가 안되는 경우에 대해 어떻게 동작하는지를 이야기하려 한다.

constructor 에 @Autowired 가 없는 경우

CDI(Constructor Dependency Injection) 을 사용하는 것은 특별한 것이 아니다. 이것을 사용하면, 일반적으로 우리가 java 를 사용하듯이 constructor 의 argument 들은 instantiated 되고나서 넘어오게 된다.

여기서 constructor argument들 에 대한 intantiation 을 @Configuration 에서 해놓으면 된다.[ref. 1], ref.1 에서 code를 확인할 수 있다.

argument 에 대한 instantiate 은 어디서 하는가?

그러나 java - How do constructor calls with @Autowired work? - Stack Overflow 를 보면, 만약 argument 에 대해서 어디선가 instantiate 를 해놓지 않았다고 하더라도, 자동으로 해주게 된다.

참고로, spring 4.3.x 부터는 constructor 가 1개라면, @Autowired 를 생략해도 된다.[ref. 2]

그래서 다음과 같은 class 에서 MyTestService 는 자동으로 instantiate 가 된다고 보면 될 듯 하다.

public class MyTestClass {

    private MyTestService service;

    public MyTestClass(MyTestService service) {
        this.service = service;
    }

}

References

  1. Constructor Dependency Injection in Spring | Baeldung
  2. @Autowired | Spring Framework Reference Documentation 4.3.x
  3. java - How do constructor calls with @Autowired work? - Stack Overflow

[컴][웹] Spring 의 @EnableWebSecurity

 

spring boot / websecurityconfig / security config /

Spring 의 @EnableWebSecurity

ref.1 , ref.2 를 보면, WebSecurityConfigurerAdapter 또는 SecurityFilterChain 이 있는 @Configuration 을 정의하면, default webapp security setting 은 switch off 된다.

ref. 1 에서는 @EnableWebSecurity 를 사용하면, default webapp security setting 이 switch off 된다고 이야기한다.

References

  1. java - What is the use of @EnableWebSecurity in Spring? - Stack Overflow
  2. 17.13.1. Switch off the Spring Boot Security Configuration

[컴] spring boot 에서 properties 추가

spring.factories 는 언제, 어떻게 사용하는가? / 환경 변수 설정 방법 / 특정 config 설정 방법 /

spring boot 에서 properties 추가

*.properties파일을 만들고, 그안에 설정값들을 넣는다고 해보자.

# myinit.properties
my.app.sleeptime=5000
my.app.rate=1

보통은 이 값을 그냥 불러다가 필요한 곳에 쓰면 된다. 근데 spring context 안에서 사용하기 위해서 spring context 가 가지고 있는 변수에 넣어주는 과정이 필요한듯 하다. (추측)

그래서 이것을 위한 방법으로 Spring 은 ConfigurableEnvironment 를 제공하는 듯 하다. 이녀석이 호출되는 시점은 아래그림을 참고하자.

from: ref. 1
// code from ref. 2
public class MyEnvPostProcessor implements EnvironmentPostProcessor {

    @Override
    public void postProcessEnvironment(ConfigurableEnvironment environment, 
      SpringApplication application) {
        PropertySource<?> system = environment.getPropertySources()
          .get(SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME);
        if (!hasOurPriceProperties(system)) {
          // error handling code omitted
        }
        Map<String, Object> prefixed = names.stream()
          .collect(Collectors.toMap(this::rename, system::getProperty));
        environment.getPropertySources()
          .addAfter(SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, new MapPropertySource("prefixer", prefixed));
    }

}

Spring Boot bootstrap process 에서 이 implementation 을 호출하기 위해서, META-INF/spring.factories 에 등록해야 된다.[ref. 2] (정말 별로다, -.-)

org.springframework.boot.env.EnvironmentPostProcessor=
  com.my.environmentpostprocessor.MyEnvPostProcessor

References

  1. Spring Context Internals: Part 2 - Bean Sources - CodeProject : spring context 에 좋은 설명
  2. Registration in the spring.factories, EnvironmentPostProcessor in Spring Boot | Baeldung