mybatis orderby처리

JSP, JAVA RSS Icon ATOM Icon 2015/10/26 23:30 visualp


* java

String orderKind  = "wbsalecount";

Map<String, Object> condition = new HashMap<String, Object>();
condition.put("orderKind" , orderKind );



* mybatis

<select id="selDomainMap1"   parameterType="java.util.Map" resultMap="libroBestsellerResultMap">   


                    <trim prefix="ORDER BY">
                        <if test="orderKind == 'wbrank'">  A.WB_RANK ASC </if>
                        <if test="orderKind == 'wbsalecount'">  A.WB_SALE_COUNT DESC </if>                       



2015/10/26 23:30 2015/10/26 23:30
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

$(document).ready(function() {








2015/10/09 21:22 2015/10/09 21:22
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

Package Explorer

Problems View

JQuery min Validation Error 없애기

Eclipse 의 Package Explorer 에서 JQuery min Validation Error 가 발생하는 프로젝트를 선택한 후 마우스 오른쪽 버튼을 클릭하여 Properties 메뉴를 선택합니다.

Properties 창이 나타나면, 좌측의 메뉴에서 Javascript > Include Path (1) 메뉴를 선택한 후 Source (2) Tab 을 선택합니다. 해당 프로젝트를 확장한 후 하위의 Excluded (3) 을 선택 한 후 Edit (4) 버튼을 클릭합니다.

Inclusion and Exclusion Patterns 창이 나타나면 Exclusion patterns 항목의 [Add] (1) 버튼을 클릭합니다.

Pattern 입력 항목에 **/jquery*.js (1) 과 같이 입력합니다. 현재 선택된 프로젝트의 모든 디렉토리에서 jquery*.js 파일명은 제외한다는 의미입니다.

Exclusion patterns 항목을 확인 한 후 [Finish] 버튼을 클릭합니다.

Source Tab 에서 Excluded 항목 설정을 확인한 후 [OK] 버튼을 클릭합니다

Package Explorer 또는 Problems View 에서 JQuery min 관련 Error 이 사라졌는지 확인합니다.


2015/10/08 18:11 2015/10/08 18:11
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

java.lang.OutOfMemoryError: PermGen space

이클립스의 톱켓에 다음과 같은 옵션을 추가 한다.

-XX:PermSize=256m -XX:MaxPermSize=256m


servers 탭의 해당하는 tomcat 선택 후 -> F3 -> Overview - General Information 하단의 Open launch configuration 클릭 후

Edit Configuration 창의 Arguments 탭을 선택 후 VM arguments: 입력란의 마지막 라인에

-XX:PermSize=256m -XX:MaxPermSize=256m

2015/10/08 16:31 2015/10/08 16:31
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

workspace의 .settings디렉토리의 org.eclipse.wst.common.project.facet.core.xml

<?xml version="1.0" encoding="UTF-8"?>


  <runtime name="Apache Tomcat v7.0"/>

  <fixed facet="wst.jsdt.web"/>

  <installed facet="java" version="1.7"/>

  <installed facet="jst.web" version="3.0"/>

  <installed facet="wst.jsdt.web" version="1.0"/>

--확인 --

web.xml 파일 확인

<web-app xmlns:xsi="" xmlns=""

xmlns:web="" xsi:schemaLocation=""


<web-app version="3.0" xmlns="" xmlns:xsi=""


2015/10/07 10:19 2015/10/07 10:19
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

c# webbro

C# RSS Icon ATOM Icon 2015/07/18 00:48 visualp
private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e){
       if (e.Url.AbsoluteUri == wb.Url.AbsoluteUri) {


ajax 용 웹페이지 파싱할 때위처럼 구현하면 여러번 사이트 로딩 되는 현상을 방지 할 수 있다.
2015/07/18 00:48 2015/07/18 00:48
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::


MariaDB 10.0 is the development version of MariaDB. It is built on the MariaDB 5.5 series with backported features from MySQL 5.6 and entirely new features not found anywhere else.
For CentOS, RedHat, and Fedora, it is highly recommended to install from a repository using YUM. This page walks you through the simple steps.

Adding the MariaDB YUM Repository

We highly recommended to use custom MariaDB YUM repository to install. Create a repo file under/etc/yum.repos.d/MariaDB.repo, Copy and paste following line under MariaDB repository:

Add repository on Centos 6.5 32-bit

# vi /etc/yum.repos.d/MariaDB.repo

and paste following line:

# MariaDB 10.0 CentOS repository list - created 2014-03-12 12:46 UTC
name = MariaDB
baseurl =

Add repository on Centos 6.5 64-bit

# vi /etc/yum.repos.d/MariaDB.repo

and paste following line:

# MariaDB 10.0 CentOS repository list - created 2014-03-12 12:47 UTC
name = MariaDB
baseurl =
Add MariaDB 10 repository on CentOS 6.4 -32-bit

Add MariaDB 10.0 repository on CentOS 6.4 -32-bit

The example file above includes a gpgkey line to automatically fetch the GPG key we use to sign the repositories. This key enables yum and rpm to verify the integrity of the packages it downloads.

Installing MariaDB 10.0 with YUM

With the repo file in place you can now install MariaDB like so:

# yum install MariaDB-server MariaDB-client -y

Starting MariaDB

After complite installation process, start MariaDB width following command:

# service mysql start


# /etc/init.d/mysql start

Set MariaDB to start on boot:

# chkconfig mysql on

Secure MariaDB after installation

  • Set (Change) root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database and access to it
  • Reload privilege tables

To secure MariaDB installation enter following command:

#  mysql_secure_installation

Example output:

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
Re-enter new password: REPEAT YOUR PASSWORD
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Restart MariaDB:

# service mysql restart

Try to connect to MariaDB:

# mysql -u root -p
Connect to MariaDB 10.0

Connect to MariaDB 10.0

That’s it. For questions please use comments.

2015/06/26 16:31 2015/06/26 16:31
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::



ArrayList 형태의 DTO 또는 VO 객체를 생성후

그 beens 객체를 jstl foreach로 반복 해주면 됨 .

2015/06/22 10:59 2015/06/22 10:59
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::


    @RequestMapping(value = "/servicelogo/{path1}/{file_name:.+}", method = RequestMethod.GET, produces = "application/octet-stream")
    public FileSystemResource getPublicFile2(
            @PathVariable("file_name") String fileName,
            @PathVariable("path1") String path1,
            HttpServletResponse response) throws Exception {
        Map<String, Object> condition = new HashMap<String, Object>();
        if(path1.equals("front")) {
            condition.put("front_logo_img", fileName);
        } else if(path1.equals("print")) {
            condition.put("print_logo_img", fileName);   
        } else {
            condition.put("front_logo_img", fileName);
        String serverFileName = Admin2Service.getServiceLogoFileName(condition);
        logger.debug("serverFileName= "+serverFileName);
        if(serverFileName == null || serverFileName.length()==0 || serverFileName.equals("")) serverFileName = "temp.jpg";
        String uploadDir = "/upload/serviceLogo";
        File f = new File(messageBundle.getMessage("file.uploadPath") + uploadDir + "/" + serverFileName);
        return new FileSystemResource(f);

2015/06/18 17:05 2015/06/18 17:05
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::

<?php $thour=17 ?>
var dateObj = new Date();
var month = dateObj.getUTCMonth() + 1; //months from 1-12
var day  = dateObj.getUTCDate();
var year = dateObj.getUTCFullYear();
var hour = dateObj.getHours();
var minute = dateObj.getMinutes();
var second = dateObj.getSeconds();

//var end = new Date('13 Apr 2016 13:30:00');
var end  = new Date(year,month-1,day,<?php echo $thour?>,0,0 );

var _second = 1000;
var _minute = _second * 60;
var _hour = _minute * 60;
var _day = _hour *24;
var timer;

function showRemaining()
    var now = new Date();
    var distance = end - now;
    if (distance < 0 ) {
       // handle expiry here..
    clearInterval( timer ); // stop the timer from continuing ..
       //alert('Expired'); // alert a message that the timer has expired..
    var days = Math.floor(distance / _day);
    var hours = Math.floor( (distance % _day ) / _hour );
    var minutes = Math.floor( (distance % _hour) / _minute );
    var seconds = Math.floor( (distance % _minute) / _second );
    var milliseconds = parseInt(distance % _second /10);

    var countdownElement = document.getElementById('timer');
 countdownElement.innerHTML = days  + 'd ' +
                                 hours + 'h ' +
                                 minutes + 'm ' +
                                 seconds + 's ' +
                                 milliseconds + 'ms';
  hours = "0" + hours;
  minutes = "0" + minutes;
  seconds = "0" + seconds;
  milliseconds = "0"+milliseconds;

 var thour = document.getElementById('thour');
 var tminute = document.getElementById('tminute');
 var tsecond = document.getElementById('tsecond');
 var tms = document.getElementById('tms');
 thour.innerHTML = hours;

timer = setInterval(showRemaining, 10);


<div id="timer">
 <span id="thour"></span>
 <span class="sp">:</span>
 <span id="tminute"></span>
 <span class="sp">:</span>
 <span id="tsecond"></span>
 <span class="sp">:</span>
 <span id="tms"></span>

2015/06/15 15:36 2015/06/15 15:36
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS ::

댓글+트랙백 ATOM ::