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
| package com.pig.spring.springaop.springaop.aspect; | |
| import org.aspectj.lang.ProceedingJoinPoint; | |
| import org.aspectj.lang.annotation.Around; | |
| import org.aspectj.lang.annotation.Aspect; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.context.annotation.Configuration; | |
| @Aspect |
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
| package com.pig.spring.springaop.springaop.business; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Service; | |
| import com.pig.spring.springaop.springaop.aspect.TrackTime; | |
| import com.pig.spring.springaop.springaop.data.Dao1; | |
| @Service | |
| public class Business1 { |
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
| package com.pig.database.databasedemo.jdbc; | |
| import java.util.List; | |
| import org.springframework.stereotype.Repository; | |
| @Repository | |
| public class PersonjdbcDao { | |
| //select * from person | |
| public List<Person> findAll(){ |
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
| package com.pig.database.databasedemo.entity; | |
| import java.util.Date; | |
| public class Person { | |
| private int id; | |
| private String name; | |
| private String location; | |
| private Date birthdate; | |
| //弄個Constructor |
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
| package com.pig.database.databasedemo.jdbc; | |
| import java.util.List; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.jdbc.core.BeanPropertyRowMapper; //new!! 來自Spring | |
| import org.springframework.jdbc.core.JdbcTemplate; //new!! 來自Spirng | |
| import org.springframework.stereotype.Repository; | |
| import com.pig.database.databasedemo.entity.Person; |
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
| package com.pig.database.databasedemo; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |
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
| package com.pig.database.databasedemo.entity; | |
| import java.util.Date; | |
| public class Person { | |
| private int id; | |
| private String name; | |
| private String location; | |
| private Date birthdate; | |
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
| package com.pig.database.databasedemo.entity; | |
| import java.util.Date; | |
| public class Person { | |
| private int id; | |
| private String name; | |
| private String location; | |
| private Date birthdate; | |
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
| package com.pig.database.databasedemo.jdbc; | |
| import java.util.List; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.jdbc.core.BeanPropertyRowMapper; //new!! 來自Spring | |
| import org.springframework.jdbc.core.JdbcTemplate; //new!! 來自Spirng | |
| import org.springframework.stereotype.Repository; | |
| import com.pig.database.databasedemo.entity.Person; |
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
| package com.pig.database.databasedemo; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; |