Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- txAdvice -->
- <tx:annotation-driven mode="aspectj" />
- <tx:advice id="txAdvice">
- <tx:attributes>
- <tx:method name="find*" />
- <tx:method name="insert*" />
- </tx:attributes>
- </tx:advice>
- <!-- Aspect -->
- <aop:aspectj-autoproxy proxy-target-class="true" />
- <aop:config>
- <aop:pointcut id="pointcut" expression="execution(* com.quapenus.*.service.*Impl.*(..))" />
- <aop:advisor pointcut-ref="pointcut" advice-ref="txAdvice" />
- </aop:config>
- @Service
- public class LoginServiceImpl implements LoginService {
- Logger logger = LoggerFactory.getLogger(LoginServiceImpl.class);
- @Autowired
- private LoginDao loginDao;
- @Override
- public Member findMemberInfo(String username) throws UsernameNotFoundException {
- Member member = loginDao.findMemberInfo(username);
- if(member == null){
- throw new UsernameNotFoundException("아이디가 존재하지 않습니다.");
- }
- return member;
- }
- @Override
- public List<GrantedAuthority> findRoles(String username) throws NotFoundException {
- List<GrantedAuthority> roles = loginDao.findRoles(username);
- if(roles.size() == 0){
- throw new NotFoundException("해당 역할이 없습니다.");
- }
- return roles;
- }
- @Override
- public void insertMember(Member member) throws RollbackException {
- int result = loginDao.insertMember(member);
- if(result == 1){
- throw new RollbackException("Test Tx");
- }
- }
- }
- 17:13:01.070 [http-nio-8080-exec-6] DEBUG
- org.springframework.beans.BeanUtils - No property editor [java.lang.StringEditor] found for type java.lang.String according to 'Editor' suffix convention
- 17:13:01.079 [http-nio-8080-exec-6] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
- 17:13:01.086 [http-nio-8080-exec-6] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@77b976a0] was not registered for synchronization because synchronization is not active
- 17:13:01.100 [http-nio-8080-exec-6] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
- 17:13:01.246 [http-nio-8080-exec-6] DEBUG o.m.s.t.SpringManagedTransaction - JDBC Connection [jdbc:mysql://127.0.0.1:3306/quapenus, UserName=root, MariaDB connector/J] will not be managed by Spring
- 17:13:01.264 [http-nio-8080-exec-6] DEBUG c.q.c.sql.LoginMapper.insertMember - ==> Preparing: insert into QPNS_MEMBER( USERNAME, PASSWORD, MEMBER_NM, MEMBER_AGE, MEMBER_GENDER, MEMBER_CMMT, MEMBER_TEL, REGIST_DT ) values ( ?, ?, ?, ?, ?, ?, ?, ? )
- 17:13:01.335 [http-nio-8080-exec-6] DEBUG c.q.c.sql.LoginMapper.insertMember - ==> Parameters: weinogaczxvz(String), (String), (String), (String), M(String), (String), null, null
- 17:13:01.341 [http-nio-8080-exec-6] DEBUG c.q.c.sql.LoginMapper.insertMember - <== Updates: 1
- 17:13:01.347 [http-nio-8080-exec-6] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@77b976a0]
- 17:13:01.347 [http-nio-8080-exec-6] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
- 17:13:01.427 [http-nio-8080-exec-6] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
- 17:13:01.428 [http-nio-8080-exec-6] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [{result=FAIL, errorMsg=Test Tx}] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@329816a3]
- 17:13:01.429 [http-nio-8080-exec-6] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
- 17:13:01.429 [http-nio-8080-exec-6] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
- 17:13:01.429 [http-nio-8080-exec-6] DEBUG o.s.s.w.a.ExceptionTranslationFilter - Chain processed normally
- 17:13:01.429 [http-nio-8080-exec-6] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
- 17:58:07.052 [http-nio-8080-exec-9] INFO com.quapenus.core.util.AspectTest - com.quapenus.login.service.LoginServiceImpl: ASPECT TEST
- 17:58:07.052 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
- 17:58:07.052 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4db7d396]
- 17:58:07.052 [http-nio-8080-exec-9] DEBUG o.m.s.t.SpringManagedTransaction - JDBC Connection [jdbc:mysql://127.0.0.1:3306/quapenus, UserName=root, MariaDB connector/J] will be managed by Spring
- 17:58:07.052 [http-nio-8080-exec-9] DEBUG c.q.c.sql.LoginMapper.findMemberInfo - ==> Preparing: SELECT USERNAME, PASSWORD, MEMBER_NM, MEMBER_TEL, MEMBER_GENDER, MEMBER_AGE, MEMBER_CMMT, REGIST_DT, UPDT_DT, DELETE_AT, ENABLED FROM QPNS_MEMBER WHERE USERNAME = ?
- 17:58:07.053 [http-nio-8080-exec-9] DEBUG c.q.c.sql.LoginMapper.findMemberInfo - ==> Parameters: asdnfasdfnsaf(String)
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG c.q.c.sql.LoginMapper.findMemberInfo - <== Total: 0
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4db7d396]
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4db7d396]
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4db7d396]
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG o.s.j.d.DataSourceTransactionManager - Initiating transaction rollback
- 17:58:07.054 [http-nio-8080-exec-9] DEBUG o.s.j.d.DataSourceTransactionManager - Rolling back JDBC transaction on Connection [jdbc:mysql://127.0.0.1:3306/quapenus, UserName=root, MariaDB connector/J]
- 17:58:07.055 [http-nio-8080-exec-9] DEBUG o.s.j.d.DataSourceTransactionManager - Releasing JDBC Connection [jdbc:mysql://127.0.0.1:3306/quapenus, UserName=root, MariaDB connector/J] after transaction
- 17:58:07.055 [http-nio-8080-exec-9] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
Add Comment
Please, Sign In to add comment