Posted
Filed under Htm&Javascript

https://jsfiddle.net/0z56f24f/2/

 var delay = 0;
    var offset = 125;
    document.addEventListener('invalid', function(e){
        $(e.target).addClass("invalid");
        $('html, body').animate({scrollTop: $($(".invalid")[0]).offset().top - offset }, delay);
    }, true);
    document.addEventListener('change', function(e){
        $(e.target).removeClass("invalid")
    }, true);

 

 

2019/08/22 00:35 2019/08/22 00:35
Posted
Filed under centos7
Edit your
/etc/yum.conf file and add
http_caching=packages

yum clean all
yum makecache
yum update

2019/07/11 17:45 2019/07/11 17:45
Posted
Filed under PHP
.htaccess 파일에 아래와 같이 막을 폴더 경로를 설정 한다.
RedirectMatch 403 ^/data/*

2019/05/16 23:41 2019/05/16 23:41
Posted
Filed under nginx
location = /robots.txt {
  add_header  Content-Type  text/plain;
  return 200 "User-agent: *\nDisallow: /\n";
}

[원문]https://alan.ivey.dev/posts/2017/robots.txt-disallow-all-with-nginx/
[참고]https://serverfault.com/questions/549332/how-to-set-robots-txt-globally-in-nginx-for-all-virtual-hosts
[참고]https://edykim.com/ko/post/overwrite-robots.txt-with-nginx-settings/
2019/04/23 18:29 2019/04/23 18:29
Posted
Filed under JSP, JAVA
[참고]https://github.com/naver/lucy-xss-servlet-filter
pom.xml 추가
<dependency>
<groupId>com.navercorp.lucy</groupId>
<artifactId>lucy-xss-servlet</artifactId>
<version>2.0.0</version>
</dependency>

 

[web.xml]
filter 순서 UTF-8 인코딩 필터가 있다면 그 다음으로
multipartFilter  추가 후 XSS filter 추가 한다.
이유) 게시판 파일 업로드  enctype="multipart/form-data"
일떄 multipartFilter 필터 타지 않을 수 있음 그래서 필터 순서를 맞춰줘야 함

<!-- multipartFilter -->
<filter>
<filter-name>multipartFilter</filter-name>
<filter-class>
org.springframework.web.multipart.support.MultipartFilter
</filter-class>
</filter>

<filter-mapping>
<filter-name>multipartFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- xss filter -->
<filter>
<filter-name>xssEscapeServletFilter</filter-name>
<filter-class>com.navercorp.lucy.security.xss.servletfilter.XssEscapeServletFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>xssEscapeServletFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

[root-context.xml]에  multipartResolver   bean설정시 아이디를
multipartResolver --> filterMultipartResolver 변경 해줌
그래야 xss 필터가 정상적으로 동작

<!-- multipartResolver -->
<!--<beans:bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />-->
<beans:bean id="filterMultipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />

2019/01/30 18:55 2019/01/30 18:55
Posted
Filed under JSP, JAVA
xml설정
xmlns:task="http://www.springframework.org/schema/task"

xsi:schemaLocation 부분에 
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-4.0.xsd

추가
<task:annotation-driven /> 추가



==================================================

1초마다 한번식 실행

@Service
public class VisitorConfig {
@Scheduled(fixedDelay = 1000)
public void visitor(){
System.out.println("test:");
}
}
2019/01/28 11:17 2019/01/28 11:17
Posted
Filed under JSP, JAVA
[원문]
http://krams915.blogspot.com/2010/12/spring-security-mvc-querying.html @Resource(name="sessionRegistry") private SessionRegistryImpl sessionRegistry; for (Object username: sessionRegistry.getAllPrincipals()) { logger.debug(username); }
2019/01/14 12:08 2019/01/14 12:08
Posted
Filed under Link
vi /etc/ssh/ssh_config
ServerAliveInterval 60
service sshd restart
2018/12/21 10:10 2018/12/21 10:10
Posted
Filed under Mysql
ALTER TABLE `tb_webstat_info`
 CHANGE COLUMN `wi_code` `wi_code` VARCHAR(10) binary DEFAULT NULL COMMENT '모바일명세표_코드' AFTER `wi_rnum`;

VARCHAR(10) binary  형식으로 설정을 해주던지
문자열 타입을  utf8_bin;으로 설정 한다
2018/09/28 18:12 2018/09/28 18:12
Posted
Filed under C#
c#  add mediaplayer component
Choose
Tool Box Items->Com Components->Windows Media Player

player.URL="재생 주소";
주소만 할당해주면 재생됨
2018/07/03 18:37 2018/07/03 18:37