๋ฐ์ํ ๊ฐ๋ฐ/Web21 [Spring Boot] mybatis ์ ์ฉํ๊ธฐ 1.gradle ํน์ maven์ 'mybatis-spring-boot-starter' ์ถ๊ฐ compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4") org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.4 2. application.yml์ mybatis ์ค์ ํ์ผ(mybatis-config.xml) ๋ฐ xml ํ์ผ ์ธํ mybatis: config-location: classpath:mybatis-config.xml mapper-locations: classpath:mapper/postgresql/*.xml 3. mybatis-config.xml 4. postgresql/*.xml SELE.. 2021. 12. 6. [JSP/HTML] ERR_CACHE_MISS ์๋ฌ ๋ฐ์ ์นํ์ด์ง(jsp, html)์์ ๋ค๋ก๊ฐ๊ธฐ๋ฅผ ํ์ ๋ 'ERR_CACHE_MISS' ์๋ฌ๊ฐ ๋ฐ์ํ ์ ์ด ์๋ค ์ด๋ด ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ํด๊ฒฐํ๋ฉด ๋๋ค! jsp๋ html๊ณผ ๊ฐ์ ์นํ์ด์ง ์๋จ์ header ์ถ๊ฐ response.setHeader("Cache-Control","no-cache); response.setHeader("Pragma","no-cache"); spring ์ค์ ์์ ๊ณตํต์ผ๋ก ์ฒ๋ฆฌ ๋ณธ์ธ์ csrf ์ฒ๋ฆฌ ๋๋ฌธ์ WebSecurityConfigurerAdapter๋ฅผ ์์๋ฐ์ classs๊ฐ ์์๊ณ , configure ๋ฉ์๋๋ฅผ ์ค๋ฒ๋ผ์ด๋ํ์ฌ csrf ๋ฐฉ์ด์ฝ๋๋ฅผ ์ธํ ํ์๋ค. ๊ทธ๋์ ์ด ๋ถ๋ถ์ ์บ์ ๋ฐฉ์ง ์ฝ๋๋ฅผ ์ถ๊ฐํ์ฌ ์์ฑํจ! @Override protected void configure(HttpS.. 2021. 12. 1. [Apache] web-was ์ฐ๋, socket_timeout ์ค์ ์ด์ ํ์ web-was๊ฐ ์ฐ๋๋ ํ๋ก์ ํธ์์ ํ ์คํธ๋ฅผ ํ๋๋ฐ ๋ฐ์ดํฐ ์ค๋ณต ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค. ๋ค๋ฅธ ์๋ฒ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ์กํ๋๋ฐ ๊ทธ ์๋ฒ์์ ์๋ต์ด 10์ด์์ ์ค์ง ์์ ์ฐ๋ฆฌ ์๋ฒ์์๋ ์ฌ์์ฒญ์ ํ๊ณ , ๊ทธ ์๋ฒ์์๋ ์ด๋ฏธ ๋ฐ์ดํฐ ์ฒ๋ฆฌ๋ฅผ ํ๊ธฐ ๋๋ฌธ์ ์ค๋ณต ์์ฒญ์ด ๋ ๊ฒ์ด๋ค. (์ฐ๋ฆฌ ์๋ฒ์์๋ ํด๋น ์์ฒญ๊ฑด์ด ๋ฏธ์๋ฃ ์ํ์ด๊ณ ..) apache์ชฝ ์ค์ ํ์ผ ์ค workers.properties๊ฐ ์๊ณ , socket_timeout์ด๋ผ๋ ํญ๋ชฉ์ด ์๋๋ฐ ์ด๊ฒ 10์ผ๋ก ์ค์ ๋์ด ์์ ๊ฒฝ์ฐ ์๋ต์ด ํด๋น ์๊ฐ ์์ ์ค์ง ์์ผ๋ฉด ์ฌ์์ฒญํ๊ฒ ๋๋ค... ์๋ฒ์ ์ํฉ์ ๋ง๊ฒ ์กฐ์ ํด์ ์ฐ์.. worker.worker1.socket_timeout=10 2021. 11. 30. [Tomcat] JNDI ์ ๋ณด ์ํธํ(DB์ ๋ณด : url, username, passowrd) / KDF ์๊ณ ๋ฆฌ์ฆ ์ด์ฉ 1. url, username, password๋ฅผ encrypt ํ๋ค. KDFEncrypted.java import java.security.MessageDigest; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Hex; public class KDFEncrypted { public static void main(String[] args) { String key = "test"; String url = "jdbc:tibero:thin:@10.10.10.XX:XXXX:tibero"; St.. 2021. 11. 30. [Spring] Scheduler(์คํ๋ง ์ค์ผ์ค๋ฌ) ์ค์ ํ๊ธฐ ์คํ๋ง์์ ํน์ ์๊ฐ ํน์ ๋ช ๋ถ, ๋ช ์๊ฐ ๋ง๋ค ๊ธฐ๋ฅ์ ๋์ ์ํค๋ ค๋ฉด Spring์์ ์ ๊ณตํ๋ scheduler๋ฅผ ์ด์ฉํ๋ฉด ๋๋ค. (Spring 3.1๋ถํฐ๋ Quartz์์ด ๊ฐ๋จํ๊ฒ ์ค์ผ์ค๋ฌ ๊ตฌํ์ด ๊ฐ๋ฅํ๋ค.) โ ๋จผ์ applicationContext์ ์ค์ผ์ค๋ฌ๋ฅผ ๋ฑ๋กํ๋ค. (Component Scan์ด ์ ์ธ๋์ด ์๋ ํ์ผ) applicationContext.xml (์์ฝ) => testJob์ doJob ๋ฉ์๋๋ฅผ 30๋ถ๋ง๋ค ์คํํ๋ ์ค์ผ์ค๋ฌ๋ฅผ ๋ฑ๋กํ๋ค. testJob์ ์๋์ ๊ฐ๋ค. TestJob.java @Service("testJob") public class TestJob { public synchronized void doJob() { System.out.println("###########.. 2021. 11. 30. ์ด์ 1 2 3 ๋ค์ 728x90 ๋ฐ์ํ