This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.boot; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration; | |
@SpringBootApplication(exclude = ThymeleafAutoConfiguration.class) | |
public class BootApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(AppSecurityApplication.class, args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 스프링 4.3부터 추가된 InjectionPoint를 이용한 Context-Aware Bean 생성 방법. | |
@Configuration | |
public class BeanConfig { | |
@Bean | |
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) | |
Logger logger(InjectionPoint injectionPoint) { | |
return LoggerFactory.getLogger(injectionPoint.getMethodParameter().getContainingClass()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// static 사용을 제한한 싱글턴 구조의 표현 예제 | |
using System; | |
public class SingletonService | |
{ | |
public string GetMessage() => "Hello World"; | |
} | |
public class ClientModule |
NewerOlder