This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<properties> | |
<!-- Spring / Hibernate version --> | |
<version.spring>4.1.1.RELEASE</version.spring> | |
<version.spring.data>1.7.0.RELEASE</version.spring.data> | |
<version.thymeleaf>2.1.3.RELEASE</version.thymeleaf> | |
<version.eclipselink>2.5.0</version.eclipselink> | |
<version.mysql>5.1.22</version.mysql> | |
<version.servlet>3.0.1</version.servlet> | |
<version.hibernate.validation>5.1.2.Final</version.hibernate.validation> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#message source | |
message.source.basename=WEB-INF/messages/messages | |
#DB properties: | |
driverClassName=com.mysql.jdbc.Driver | |
url=jdbc:mysql://localhost:3306/healthcaredb | |
username=demo | |
password=pass | |
initialSize=5 | |
maxActive=50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableTransactionManagement | |
@EnableJpaRepositories("com.itrane.healthcare.repo") | |
public class DbConfig { | |
@Resource | |
private Environment env; | |
// データソースの設定。 | |
// プロパティの値は src/resources/app.properties から取得 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.title=健康管理 | |
app.footer=健康管理 2014 | |
home.title=バイタルチェック <small>健康管理 ホーム</small> | |
home.welcome=<b>バイタル・チェック</b>アプリで毎日のバイタルをチェックしましょう! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebMvc | |
@Import({ DbConfig.class }) | |
// データベース設定をインポート | |
@ComponentScan("com.itrane.healthcare") | |
@PropertySource("classpath:resources/app.properties") | |
public class WebAppConfig extends WebMvcConfigurerAdapter { | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "vital") | |
public class Vital implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Id | |
@GeneratedValue | |
private Long id = null; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "vod") | |
public class Vod implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Id | |
@GeneratedValue | |
private Long id = null; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "vitalmst") | |
public class VitalMst implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Id | |
@GeneratedValue | |
private Integer id = null; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface VodRepository extends JpaRepository<Vod, Long> { | |
@Query("select v from Vod v where v.sokuteiBi = ?1") | |
public List<Vod> findBySokuteiBi(String sokuteiBi); | |
@Query("select v from Vod v where v.sokuteiBi between ?1 and ?2 order by v.sokuteiBi") | |
public List<Vod> findBySokuteiBiBetween(String sokuteiBi1, String sokuteiBi2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class VodServiceImpl implements VodService { | |
@Resource | |
private VodRepository vodRepository; | |
@Resource | |
private VitalRepository vitalRepository; | |
@PersistenceContext |
OlderNewer