This file contains 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
package com.blabadi.gradle.dao; | |
import java.io.IOException; | |
import java.util.Properties; | |
import javax.sql.DataSource; | |
import org.hibernate.SessionFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; |
This file contains 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
package com.blabadi.gradle.dao; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
@Entity | |
@Table(name = "Person") |
This file contains 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
package com.blabadi.gradle.bl; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Import; | |
import com.blabadi.gradle.dao.DaoConfig; | |
@Configuration | |
@ComponentScan({"com.blabadi.gradle.bl"}) |
This file contains 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
package com.blabadi.gradle.rest; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
import com.blabadi.gradle.be.Person; | |
import com.blabadi.gradle.bl.PersonService; |
This file contains 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
package com.ubc.dao.mybatis.mapper; | |
import org.apache.ibatis.annotations.Param; | |
import org.apache.ibatis.annotations.Select; | |
import com.ubc.entities.AppUser; | |
public interface AppUserMapper { | |
@Select("SELECT * FROM users WHERE id = #{userId}") | |
AppUser getUser(@Param("userId") String userId); |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
<mapper namespace="com.xxx.dao.mybatis.mapper.CustomAppUserMapper"> | |
<select id="getUserIdByName" parameterType="java.lang.String" resultType="java.lang.Long"> | |
SELECT id FROM app_user WHERE name = #{name} | |
</select> | |
</mapper> |
This file contains 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
FROM openjdk:8-jdk-alpine | |
VOLUME /tmp | |
ARG JAR_FILE=./web/build/libs/nutracker-api-0.1.jar | |
COPY ${JAR_FILE} app.jar | |
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] |
This file contains 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
version: "2" | |
services: | |
app: | |
container_name: nutracker-api | |
restart: always | |
build: . | |
expose: | |
- 8080 | |
ports: |
This file contains 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
node_modules | |
.git |
This file contains 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
import React, { Component } from 'react'; | |
class SearchBox extends Component { | |
state = { | |
term: '' | |
}; | |
onTermChange = (e) => { | |
e.preventDefault(); | |
const value = e.target.value; |
OlderNewer