728x90
Docker
Install - Unbuntu
# Docker
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker ${USER}
Linux Ubuntu
- 그냥 내가 사용자 추가 할때 쓰는 코드
useradd -m user passwd user echo "user ALL=(ALL) NOPASSWD:ALL">>/etc/sudoers
## mariadb conf
[client]
port = 3306
default-character-set=utf8
[mysqld]
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
key_buffer_size = 512M
innodb_buffer_pool_size = 512M
init_connect="SET collation_connection=utf8_general_ci"
character-set-server = utf8
collation-server = utf8_unicode_ci
[mysql]
default-character-set=utf8
Spring boot
- gradle dependency 추가 : implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
- log : log4jdbc.log4j2.properties 추가
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
log4jdbc.dump.sql.maxlinelength=0
- application.yml 수정
spring.datasource.driverClassName=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
jdbc:log4jdbc:mariadb://
~~~
- logging
logging: level: root: INFO org: hibernate: type: TRACE SQL: INFO jdbc: audit: OFF resultset: OFF resultsettable: INFO sqlonly: OFF sqltiming: INFO connection: OFF
- @EntityListeners(AuditingEntityListener.class)
- @EnableJpaAuditing
VScode
- spring boot args
- launch.json
"args": "--spring.profiles.active=local"
728x90