일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- grep
- port
- Windows
- GIT
- context
- plugin
- tomcat
- ssh
- JavaScript
- 단축키
- Eclipse
- import
- netsh
- resource
- Windows 10
- 줄바꿈 문자
- lsof
- Quartz
- profile
- VirtualBox
- vscode
- web.xml
- maVen
- 네트워크
- Mac
- IntelliJ
- xargs
- bash
- Source
- find
- Today
- Total
목록Dev (274)
develog
@Autowired private ResourceLoader resourceLoader; String filePath = "classpath:static/my-static-file.txt"; InputStream inputStream = resourceLoader.getResource(filePath).getInputStream(); String str = FileCopyUtils.copyToString(new InputStreamReader(inputStream)); System.out.println("str = " + str);
PostConstruct @Component @RequiredArgsConstructor public class InitDB { private final InitService initService; @PostConstruct public void init() { initService.dbInit1(); } } @Component @RequiredArgsConstructor public class InitDb { private final ItemRepository itemRepository; @PostConstruct public void init() { itemRepository.save(new Item("item1", 1000, 10)); itemRepository.save(new Item("item2..
implementation 'org.springframework.boot:spring-boot-starter-validation' github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.3-Release-Notes#validation-starter-no-longer-included-in-web-starters spring-projects/spring-boot Spring Boot. Contribute to spring-projects/spring-boot development by creating an account on GitHub. github.com
ConfA.java @Component @PropertySource("classpath:properties/confA.properties") public class ConfA { @Value("${aa.bb}") public String value; } ConfB.java @Component @PropertySource("classpath:properties/confB.properties") public class ConfB { @Value("${cc.dd}") public String value; } properties files resources properties confA.properties confB.properties
프로젝트 루트에 Dockerfile 만들기 # Dockerfile FROM openjdk:11 ARG JAR_FILE=build/libs/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java", "-jar", "/app.jar"] docker 이미지 만들기 docker build -t myapp:1.0 . # 이미지 확인 docker images docker 컨테이너 실행 docker run -d -p 8080:8080 --name myapp myapp:1.0 # 컨테이너 확인 docker ps 실행 확인 http://localhost:8080
docker run -e TZ=Asia/Seoul