일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- mysql
- Numpy
- Pattern
- Github
- SSH
- 함수
- Server
- error
- Spring
- learning
- db
- mariaDB
- javascript
- data
- 자바
- Security
- git
- DeepLearning
- framework
- Linux
- Analysis
- Python
- interface
- ai
- java
- LIST
- Web
- 인공지능
- Deep
- centos
- Today
- Total
목록java (44)
PostIT
1. Config// Message Source(Error part)@Beanpublic MessageSource messageSource() {ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();messageSource.setBasename("messages");messageSource.setDefaultEncoding("UTF-8");return messageSource;} // Language 설정부분@Beanpublic LocaleChangeInterceptor localeChangeInterceptor() {LocaleChangeInterceptor localeChangeInterceptor = new Loc..
http://lahuman.jabsiri.co.kr/87 properties 파일 전체 encoding 하는 법 window -> preferences -> general -> content types -> java properties file 하단에 Default encoding 변경
https://gs.saro.me/#!m=elec&jn=810 서론 최근에 서버와 클라이언트 양쪽에 템플릿 엔진이 있는 것들을 찾아보다가 스프링 부트에 기본적으로 있는 mustache 가 있다는 것을 알았습니다. - mustache : https://gs.saro.me/#!m=elec&jn=796 문제는 i18n이나 시큐리티, session 같은 경우 타임리프나 JSTL 처럼 사용할만한 방법이 없어 찾아보던 중 HandlerInterceptorAdapter를 사용해 보았습니다. - 물론 모델이 매번 넣어주는 방법도 있겠지만 유지보수도 안좋고 자원도 심하게 망가짐으로... WebMvcConfigurerAdapter - http://docs.spring.io/spring/docs/current/javadoc..
private String jsonReadAll(Reader reader) throws IOException { StringBuilder sb = new StringBuilder(); int cp; while ((cp = reader.read()) != -1) { sb.append((char) cp); } return sb.toString(); } private JSONObject readJsonFromUrl(String url) throws IOException, JSONException { InputStream is = new URL(url).openStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(is, Char..
How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipsehttp://crunchify.com/how-to-fix-cannot-change-version-of-project-facet-dynamic-web-module-to-3-0-error-in-eclipse/Today while converting Dynamic Web Project to Maven project I got below Error:12Cannot change version of project facet Dynamic Web Module to 3.0 One or more constraints have not been satisfied..
http://huskdoll.tistory.com/38http://huskdoll.tistory.com/38 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768package test; import org.json.simple.JSONArray;import org.json.simple.JSONObject; public class JsonCreateTest { public static void main(String[] args) { //최종 완성될 JSONObject 선언(전체) JSONObject jsonObject = new JS..
http://huskdoll.tistory.com/6 자바에서 JSON을 처리 하는 부분입니다.String 형식의 JSON을 JSONObject 형으로 만들어 추출하는 예제 입니다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105import org.json.simple.JSONArray;import org.json.simple.JSONObject;import org.json.simple..
* 스프링 @Valid를 통한 유효성 검사 @Valid에는 기본적으로 14개의 검증 어노테이션을 제공한다.@AssertFalse : false 값만 통과 가능@AssertTrue : true 값만 통과 가능@DecimalMax(value=) : 지정된 값 이하의 실수만 통과 가능@DecimalMin(value=) : 지정된 값 이상의 실수만 통과 가능@Digits(integer=,fraction=) : 대상 수가 지정된 정수와 소수 자리수보다 적을 경우 통과 가능@Future : 대상 날짜가 현재보다 미래일 경우만 통과 가능@Past : 대상 날짜가 현재보다 과거일 경우만 통과 가능@Max(value) : 지정된 값보다 아래일 경우만 통과 가능@Min(value) : 지정된 값보다 이상일 경우만 통과 가..
# Spring에서 Java로 Mybatis연동 Spring Boot를 사용해보면서, Boot App으로 켜지는 것을 보고 Xml로 설정하지 않고,자바로 설정하면 어떠해볼지 생각해봤다. 사람들이 Xml로 설정하는데에는 그만한 이유가 있을 것이라고 생각했지만,자바로 구현하고 싶은 마음에 구현했다. 그러나, 실행해보니 의존성(?)이 너무 강하다는 것을 느꼈다.Java에서는 변경이 되면 프로젝트 전체를 다시 스캔한다. 개인적으로 xml에 비해 이부분이 상당히 불편하게 느껴졌다그럼에도 불구하고, Java로 Mybatis연동을 성공했다. 환경 : Mac OS 10.11.6Java 1.8STS(Spring)a TomcatMybatis org.springframework.bootspring-boot-starter-j..
# CDN(Content Delivery Network) 웹 프로그래밍에서 자주 볼 수 있는 CDN에 대해 알아보고자 한다.웹 프로그래밍에서 결국 User가 볼 수 있는것은 프론트(Html)과 Resources(JS,CSS)에 대한 내용밖에 없다.이런 페이지를 꾸며줄 수 있는 자원들에 대해서 우리는 CDN이 사용된다.어떤 사람은 만들어서 사용하고, 어떤 것은 CDN을 사용하고, 어떤것은 Webjars를 통해 이용한다.더 많은 것들이 있을 수 있겠지만, 일단 내가 알고 있는 것은 이 3가지 이다. 1. 프로그램을하면 Resources를 만들어서 폴더위치에 맞게 적용시키는 것. classpath에서부터 경로안에 있는 CSS를 적용시킨다. 혹은 JS기능을 적용시킨다. 2. CDN을 통해 기본 Resources..