Getting Project Version to be displayed in the pages without much hassles..
pom.xml file changes${project.version} in your html file maven-war-plugin 2.4 WebContent false
Getting Project Version to be displayed in the pages without much hassles..
pom.xml file changes${project.version} in your html file maven-war-plugin 2.4 WebContent false
I wanted to define repeated columns in JPA. But when I do, I got the message the second column should be defined as insert="false" , update="false"
Approach 1: Here is an easy way to do it. In the entity bean define the second property as follows
@Column(name="UPLOAD_DATE") private Date uploadDate; @AttributeOverride(name="uploadDateAsTime", column = @Column (name = "UPLOAD_DATE")) private Timestamp uploadDateAsTime; @Column(name="UPLOAD_STATUS")
Approach 2: Here is the alternatie way to do it via XML file..
it would take care of giving unique names for enbeddable field columns in target entity class. ddl, callback
Use Spring Custom Context Loader.
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.context.support.SpringBeanAutowiringSupport; import com.fra.exception.ApplicationException; import com.fra.exception.SystemException; import com.fra.fv.service.IModuleConfigService; @WebListener public class CustomContextListener implements ServletContextListener { @Autowired @Qualifier(value = "mdlConfigService") IModuleConfigService mdlConfigService; final static Logger logger = Logger.getLogger(CustomContextListener.class); public CustomContextListener() { super(); } @Override public void contextInitialized(ServletContextEvent event) { SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this); try { mdlConfigService.loadModuleConfigs(); } catch (ApplicationException e) { logger.error(ExceptionUtil.getFullExceptionAsString(e, 50)); } catch (SystemException e) { logger.error(ExceptionUtil.getFullExceptionAsString(e, 50)); } } @Override public void contextDestroyed(ServletContextEvent event) { } }