728x90

오라클에서 COMMENT 다는 방법

- TABLE COMMENT 추가
   comment ON TABLE 테이블명 IS '설명'


- 컬럼 COMMENT 추가
   comment ON COLUMN 테이블명.필드명 IS '설명'


- TABLE COMMENT 삭제 
   comment ON TABLE 테이블명 IS ''

- TABLE COMMENT 확인
   SELECT * FROM ALL_COL_COMMENTS WHERE TABLE_NAME = '테이블명';

출처: https://uniksy1106.tistory.com/167 [* 루이지노의 행복한 이야기 : )]

728x90

'프로그래밍 > Oracle' 카테고리의 다른 글

오라클 락 해제하기  (0) 2022.07.27
오라클 락 해제하기  (0) 2022.07.19
오라클 테이블스페이스 생성  (0) 2019.04.04
오라클 분석함수  (0) 2016.05.04
oracle hr 사용자 unlock  (0) 2016.01.25
728x90

요즘에 보안에 대해서 민감하기 때문에 최대한 보안에 문제되는 점은 사전에 점검한다.
HTTP method 중에 GET, POST, PUT, DELETE, TRACE, OPTIONS등
불필요한건 제거하는 게 좋다.
apache / apache-tomcat의 설정이 조금 다르다.
apache-tomcat의 경우 해당 프로젝트의 web.xml에 다음과 같이 설정해 주면 된다.

 

tomcat의 ajp기능 비활성 시키기

 

해당 웹프로젝트의 web.xml에 아래 내용 추가

 

 

 <security-role>
  <description>Nobody should be in this role so JSP files are protected from direct access.</description>
  <role-name>nobody</role-name>
 </security-role>
 <security-constraint>
  <web-resource-collection>
   <web-resource-name>Forbidden</web-resource-name>
   <url-pattern>/*</url-pattern>
   <http-method>PUT</http-method>
   <http-method>DELETE</http-method>
   <http-method>TRACE</http-method>
   <http-method>PATH</http-method>
   <http-method>OPTIONS</http-method>

   <http-method>PROPFIND</http-method>

   <http-method>PROPPATCH</http-method>

   <http-method>COPY</http-method>

   <http-method>MOVE</http-method>

   <http-method>LOCK</http-method>

   <http-method>UNLOCK</http-method>

   <http-method>HEAD</http-method>
   <http-method>GET</http-method>
  </web-resource-collection>
  <auth-constraint>
   <role-name>nobody</role-name>
  </auth-constraint>
 </security-constraint>

 

728x90
728x90

-- 데이터 테이블스페이스 생성

CREATE TABLESPACE DEV_DATA

DATAFILE 'C:\database\oracle\oradata\orcl\DEV_DATA.ORA' SIZE 1G

AUTOEXTEND ON NEXT 10M MAXSIZE 10G

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

 

-- 인덱스 테이블스페이스 생성

CREATE TABLESPACE DEV_IDX

DATAFILE 'C:\database\oracle\oradata\orcl\DEV_IDX.ORA' SIZE 100M

AUTOEXTEND ON NEXT 10M MAXSIZE 500M

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

 

-- 임시 테이블스페이스 생성

CREATE TEMPORARY TABLESPACE DEV_TMP

TEMPFILE 'C:\database\oracle\oradata\orcl\DEV_TMP.ORA' SIZE 100M

AUTOEXTEND ON NEXT 5M MAXSIZE 500M

EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1024K;

 

-- 사용자 생성 후 tablespace 지정

create user dev identified by dev

default tablespace dev_data

temporary tablespace dev_tmp;

 

-- 사용자 권한설정

grant connect, resource, dba to dev;

728x90

'프로그래밍 > Oracle' 카테고리의 다른 글

오라클 락 해제하기  (0) 2022.07.19
오라클에서 COMMENT 다는 법  (0) 2019.04.24
오라클 분석함수  (0) 2016.05.04
oracle hr 사용자 unlock  (0) 2016.01.25
ORACLE PLS-553 오류 처리  (0) 2015.04.29
728x90

<Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" />

728x90
728x90

No bean named 'egovFileIdGnrService' is defined..

분류없음 2013.08.30 14:04

 

Eclipse  maven Project 에서 서버 등록, 실행시 하기와 같은 에러메시지가 나온다면.

     Error creating bean with name 'xxxxxxxx': 

     ..

     No bean named 'xxxxxxxxxxx' is defined 

 

프로젝트 설정 파일들이 제대로 배포가 안되어서 발생한 오류다.

설정 파일들이 제위치에 배포되도록 되어 있는지 확인하고 없으면 추가해준다.

 


1. 프로젝트 > Properties > Deployment Assembly  을 선택

2. 아래 항목이 없으면 추가

     Source              |     Deploy Path

    /src/main/java                 WEB-INF/classes

    /src/main/resource          WEB-INF/classes      <- 이녀석이 누락되어서 발생한 경우..

    /src/main/webapp           / 

    Maven Dependencies       WEB-INF/lib


출처 : http://eknote.tistory.com/1820

728x90
728x90

maven 설정

pom.xml 설정

-------------

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.7</version>
        </dependency>          
       
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.7</version>
        </dependency>        

------------

전자정부 프레임웍의 dispatcher-serlvet.xml 설정

dispatcher-serlvet.xml 위치는 설정하기 나름이지만 전자정부프레임웍에서는 WEB-INF/config/egovframework/springmvc/dispatcher-serlvet.xml 있다

----------

<bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  

       <property name="messageConverters">
            <list>
                <ref bean="jacksonMessageConverter"/>
            </list>
        </property>
 </bean>

<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" p:prefixJson="false"/>

------------

org.springframework.web.servlet.view.json.MappingJacksonJsonView 설정시 order는 설정하면 에러 발생한다. 왜 발생하는지는 공부좀 해야 할것 같고 일단은 없으면 안난다.

다른곳에 참고할때는 web.xml도 action 에 대해 json 설정을 하라고 되어 있지만 확장자를 *.json으로 사용하지 않으므로 설정할 필요는 없다.


java 에서는 @ResponseBody 어노테이션을 사용하여 리턴처리를 한다.

-------------------

@Controller

public class UserInfoController {

Logger logger = Logger.getLogger(this.getClass());

.......

    @RequestMapping("/userInfo/selectMemberJq.do")
    public @ResponseBody UserInfoVO selectMemberJq(@ModelAttribute("userInfoVO") UserInfoVO  

         userInfoVO) throws Exception{
        UserInfoVO resultVO = new UserInfoVO();
        resultVO = userInfoService.selectUserInfoData(userInfoVO);
        return resultVO;
    }

}

--------------------

UserInfoVO 형태의 json을 리터하게 된다 [userId=aa15,userEmail=aa15@aa.aa, ....]

jsp 부분에서는 별다는 처리하지 않는다. jquery를 쓰던 Ajax를 쓰던 처리를 하면된다.

모 외국 사이트를 찾던중 @ResponseBody만 사용하면 되는것 처럼 예제를 써 놓았지만 실제로는 일부 내용이 빠진것 같다. 아니면 내가 잘 몰라서 그럴수도 있음....

728x90
728x90


아놔.

poi로 엑셀을 읽어들이는데 숫자포맷으로 되어있어서 지수로 표시되었다....



6061600042650 -> 6.06160004265E12 


텍스트로 올라왔어야 하는데. 숫자포맷을 문자로 변경되는 법을 찾다가... 엄청 나게 쉬운..


셀타입을 String으로 변경한후에 읽어버리면 숫자포맷이 없어져서 문자열로 읽을수가 있었다.




    switch(obj.getCellType()) {

    case Cell.CELL_TYPE_STRING

    return obj.getStringCellValue();

    

    case Cell.CELL_TYPE_NUMERIC:

    obj.setCellType(Cell.CELL_TYPE_STRING);

    //return String.valueOf((obj.getNumericCellValue()));

    return obj.getStringCellValue();

    

    case Cell.CELL_TYPE_BLANK:

    return "";

    

    case Cell.CELL_TYPE_BOOLEAN:

    return String.valueOf((obj.getBooleanCellValue()));

    default

    return "";

    }



728x90

'프로그래밍 > java' 카테고리의 다른 글

인터넷이 끊겼을 때 spring xsd 관려  (0) 2020.01.14
String, StringBuffer, StringBuilder의 장단점 및 차이점  (0) 2019.10.11
에러코드 정리  (0) 2016.05.25
스프링 DI  (0) 2016.03.29
에자일 방법론  (0) 2016.03.29
728x90

<meta http-equiv="X-UA-Compatible" content="IE=5" />

<meta http-equiv="X-UA-Compatible" content="IE=6" />

<meta http-equiv="X-UA-Compatible" content="IE=7" />

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<meta http-equiv="X-UA-Compatible" content="IE=9" />

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

728x90

+ Recent posts