Skip to content

Instantly share code, notes, and snippets.

@rohman
rohman / view.html
Created April 10, 2013 23:46
Ulang Spring Mvc
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>List Tamu</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
@rohman
rohman / appicationContext.xml
Created April 11, 2013 23:41
Ulang Spring mvc Service
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/aop/spring-aop-2.5.xsd/spring-spring-aop-2.5.xsd-3.1.1.RELEASE.xsd
@rohman
rohman / hibernate.cfg.xml
Created April 11, 2013 23:41
Ulang Spring mvc Service
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.dialect">
org.hibernate.dialect.MySQL5InnoDBDialect
</property>
<mapping class="id.web.rohman.ulangspringservice.model.Tamu" />
@rohman
rohman / jdbc.properties
Created April 11, 2013 23:42
Ulang Spring mvc Service
# To change this template, choose Tools | Templates
# and open the template in the editor.
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
jdbc.driver = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://localhost/belajar?zeroDateTimeBehavior=convertToNull
jdbc.username = belajar
jdbc.password = belajar
@rohman
rohman / Tamu.java
Created April 11, 2013 23:43
Ulang Spring mvc Service
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspringservice.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
@rohman
rohman / TamuService.java
Created April 11, 2013 23:44
Ulang Spring mvc Service
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspringservice.service.api;
import id.web.rohman.ulangspringservice.model.Tamu;
import java.util.List;
/**
@rohman
rohman / TamuServiceImpl.java
Created April 11, 2013 23:45
Ulang Spring mvc Service
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package id.web.rohman.ulangspringservice.service.impl;
import id.web.rohman.ulangspringservice.model.Tamu;
import id.web.rohman.ulangspringservice.service.api.TamuService;
import java.util.List;
import org.hibernate.SessionFactory;
@rohman
rohman / UlangSpringservice.java
Created April 11, 2013 23:47
Ulang Spring mvc Service MainClass
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ulang.springservice;
import id.web.rohman.ulangspringservice.model.Tamu;
import id.web.rohman.ulangspringservice.service.api.TamuService;
import java.sql.Connection;
import java.sql.SQLException;
@rohman
rohman / Tamu.php
Created April 16, 2013 10:20
Belajar TypeHead Bootstrap CI
<?php
class Tamu extends CI_Controller
{
public $data;
function __construct()
{
parent::__construct();
}
@rohman
rohman / tamu_model.php
Created April 16, 2013 10:21
Belajar TypeHead Bootstrap CI
<?php
class Tamu_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
function cariTamu($namaTamu, $limit)
{