링크: https://docs.jboss.org/hibernate/orm/3.3/reference/ko-KR/html/queryhql.html

posted by 뚱2

링크: https://github.com/FasterXML/jackson-datatype-hibernate


Hibernate Entity를 바로 Json으로 변환할때 Lazy 프로퍼티로 예외가 발생한다.

그럴때 @JsonIgnore를 하면 되기는 한데 케이스 바이 케이스로 항상 어노테이션을 설정할수 없다.

그럴때 참 편하게 도와준다.

'Java > Jackson' 카테고리의 다른 글

[Jackson] Jackson documentation  (0) 2014.01.19
posted by 뚱2

링크: http://docs.jboss.org/hibernate/core/4.3/javadocs/org/hibernate/type/StandardBasicTypes.html

posted by 뚱2

링크: http://beyondj2ee.tumblr.com/post/14508592466/tomcat-7-jndi-datasource-spring

posted by 뚱2
posted by 뚱2

링크: http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/

posted by 뚱2

[Java] Cron 문법

Java/Java 2014. 3. 31. 16:24

링크: http://blog.naver.com/aau21?Redirect=Log&logNo=130057861117


'Java > Java' 카테고리의 다른 글

[Java] Java Installer IzPack  (0) 2014.06.24
[Java] Current Project classpath  (0) 2014.05.31
[Java] Open Source Installers Generators in Java  (0) 2014.01.07
[Java] enum에 대해서  (0) 2013.12.24
[Java] Java Garbage Collection  (0) 2013.11.28
posted by 뚱2

설명보다 제목적기가 더 힘들다.


Bean을 일일이 설정하기 힘들기 때문에 SpringMVC에서는 MVC 구분에 맞춰서

@Controller, @Service, @Repository가 있다. 또한 이와 관계없이 @Component  어노테이션이 존재한다.


나는 보통 @Controller는 servlet context에 설정하고

@Service, @Repository, @Component는 root context에 설정한다.


그래서 servlet-context에 아래와 같이 설정했다.

    <context:component-scan base-package="com.ddoong2">

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository" />

    </context:component-scan>


그리고 root-context에는 다음과 같이 설정했다.

    <context:component-scan base-package="com.ddoong2">

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Repository" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />

    </context:component-scan>



그런데 이번에 @Component 어노테이션을 사용할 일이 있어서 사용했더니 이개 두번 생성된다.

servlet context와 root context에서 같이 생성되는 현상이 발생했다.


그래서 servlet context를 아래와 같이 설정했다.

    <context:component-scan base-package="com.ddoong2">

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository" />

        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Component" />

    </context:component-scan>


그랬더니 페이지를 찾을 수 없다는 404에러가 발생했다.

원인은 컨트롤러 빈이 로딩이 되지 않는것이였다.

원인을 찾아보니 @Controller 어노테이션의 소스에서 찾았다.

@Target({ElementType.TYPE})

@Retention(RetentionPolicy.RUNTIME)

@Documented

@Component

public @interface Controller {


/**

* The value may indicate a suggestion for a logical component name,

* to be turned into a Spring bean in case of an autodetected component.

* @return the suggested component name, if any

*/

String value() default "";


}

Controller 어노테이션이 Component 어노테이션을 사용하고 있는 것


그리고 최종으로 아래와 같이 수정해서 해결했다.

servlet context 

    <context:component-scan base-package="com.ddoong2" use-default-filters="false">

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />

    </context:component-scan>


root context

    <context:component-scan base-package="com.ddoong2" use-default-filters="false">

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Repository" />

        <context:include-filter type="annotation" expression="org.springframework.stereotype.Component" />

    </context:component-scan>


component-scan의 프로퍼티중에 use-default-filters의 기본값은 true 이다.

이 부분을 false로 하고 설정을 하면 다른 필터는 로딩되지 않고 순수하게 설정된 부분만 필터링이된다.

posted by 뚱2

링크: http://blog.softwareinlife.com/2013/05/building-applications-with-spring-data.html

posted by 뚱2

[java] Java Profiler YourKit

Java 2014. 3. 21. 17:15

링크: http://www.yourkit.com/home/index.jsp

posted by 뚱2

링크: http://javacan.tistory.com/123

링크: http://sonegy.wordpress.com/2011/12/29/spring-3-1%EA%B3%BC-ehcache/

링크: http://whiteship.me/?p=13271

'Java > ehcache' 카테고리의 다른 글

[ehcache] Using Hibernate and BigMemory Go  (0) 2014.12.08
[ehcache] Springframework에 Ehcache 적용하기  (0) 2014.06.01
posted by 뚱2

링크: http://vinaytechs.blogspot.kr/2010/03/hibernate-performance-tuning.html

posted by 뚱2

링크: http://ehcache.org/documentation/integrations/hibernate

링크: https://docs.jboss.org/hibernate/core/4.3/devguide/en-US/html/ch06.html

posted by 뚱2

링크 : http://docs.spring.io/spring/docs/3.2.6.RELEASE/spring-framework-reference/htmlsingle/#format-configuring-formatting-mvc

posted by 뚱2

링크 : http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch18s02.html


* HiddenHttpMethodFilter

링크 : http://helols.tistory.com/328

posted by 뚱2

[Spring] Validation

Java/SpringFramework 2014. 1. 21. 02:52

링크 : http://docs.spring.io/spring/docs/3.2.6.RELEASE/spring-framework-reference/htmlsingle/#validation-beanvalidation

posted by 뚱2

[Jackson] Jackson documentation

Java/Jackson 2014. 1. 19. 20:37


Jackson Documentation: http://wiki.fasterxml.com/JacksonDocumentation

Jackson 2 Annotation: http://wiki.fasterxml.com/JacksonAnnotations



'Java > Jackson' 카테고리의 다른 글

[Jackson] Jackson-datatype-hibernate4  (0) 2014.04.24
posted by 뚱2

링크 : http://java-source.net/open-source/installer-generators

'Java > Java' 카테고리의 다른 글

[Java] Current Project classpath  (0) 2014.05.31
[Java] Cron 문법  (0) 2014.03.31
[Java] enum에 대해서  (0) 2013.12.24
[Java] Java Garbage Collection  (0) 2013.11.28
[Java] ThreadLocal  (0) 2013.08.21
posted by 뚱2

[Tiles] Tiles Documentation

Java/Tiles 2014. 1. 7. 16:46

Config : http://tiles.apache.org/framework/config-reference.html

WildCard : http://tiles.apache.org/framework/tutorial/advanced/wildcard.html

'Java > Tiles' 카테고리의 다른 글

[Tiles] 스프링을 이용한 Tiles 에 EL 및 Wildcard 연동  (0) 2014.01.07
posted by 뚱2

링크 : http://slothink.tistory.com/117

'Java > Tiles' 카테고리의 다른 글

[Tiles] Tiles Documentation  (0) 2014.01.07
posted by 뚱2

링크 : http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/

posted by 뚱2

[Java] enum에 대해서

Java/Java 2013. 12. 24. 14:26

링크 : http://bluepoet.me/2012/07/18/%EB%B2%88%EC%97%AD%EC%9E%90%EB%B0%94-enum%EC%9D%98-10%EA%B0%80%EC%A7%80-%EC%98%88%EC%A0%9C/

링크 : http://iilii.egloos.com/4343065/

'Java > Java' 카테고리의 다른 글

[Java] Cron 문법  (0) 2014.03.31
[Java] Open Source Installers Generators in Java  (0) 2014.01.07
[Java] Java Garbage Collection  (0) 2013.11.28
[Java] ThreadLocal  (0) 2013.08.21
[Java] JDBC SQL Server 연결 URL  (0) 2013.07.18
posted by 뚱2

링크 : http://debop.blogspot.kr/2013/03/spring-31-redis-cache.html

posted by 뚱2

소개 : http://kwon37xi.egloos.com/4747016

가이드: http://kwonnam.pe.kr/wiki/gradle

'Java > Groovy / Gradle' 카테고리의 다른 글

[Gradle] User Guide  (0) 2015.03.03
[Groovy] Groovy Korea Homepage  (0) 2014.06.06
[Gradle] Gradle 사용자 가이드.  (0) 2014.06.05
[Gradle] Maven을 넘어 Gradle로 가자  (0) 2014.06.05
[Gradle] Gradle 에 대해서...  (0) 2013.11.29
posted by 뚱2

링크 : http://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html/

posted by 뚱2

링크 : http://springmvc.egloos.com/509029

posted by 뚱2

링크 : http://docs.jboss.org/ejb3/app-server/HibernateAnnotations/reference/en/html_single/index.html

posted by 뚱2

링크 : http://blog.hazard.kr/114

'Java > Jsp' 카테고리의 다른 글

[Jsp] 간단하게 Excel 출력하기  (0) 2012.07.27
[Jsp] Java EL 개요  (0) 2012.02.22
[Jsp] Java Custom Tag  (0) 2012.02.09
[Jsp] JSTL <c:forEach></c:forEach> 반복처리  (0) 2011.11.07
[JSP] 물리적 경로를 웹상의 상대 경로로 변환  (0) 2011.08.23
posted by 뚱2
링크 : http://www.slipp.net/wiki/display/IDE/Gradle



'Java > Groovy / Gradle' 카테고리의 다른 글

[Gradle] User Guide  (0) 2015.03.03
[Groovy] Groovy Korea Homepage  (0) 2014.06.06
[Gradle] Gradle 사용자 가이드.  (0) 2014.06.05
[Gradle] Maven을 넘어 Gradle로 가자  (0) 2014.06.05
[Gradle] Gradle 사용자 가이드  (0) 2013.12.18
posted by 뚱2