/SSM

:two_hearts: build SSM from 0 ๐Ÿ‘‰๐Ÿฝ๐Ÿ‘‰๐Ÿฝ distributed micro service.

Primary LanguageJavaGNU General Public License v2.0GPL-2.0



ไธญๆ–‡็ฎ€ไป‹

I'll update some skills in actual development aperiodically.There are no complicated operation flows or xxx system,just some practical shares about skills.

Directory Structure

โ”œโ”€โ”€ SSM-API                                    // common API  
โ”‚   โ”œโ”€โ”€ src/main
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€java/com/crossoverJie               // specific codeใ€‚  
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€resources
โ”œโ”€โ”€ SSM-BOOT                                   // Available for internal use of dubbo dependencies 
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€resources/spring                    // dubbo consumer configuration
โ”œโ”€โ”€ SSM-SECONDS-KILL                           // seckill module
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€SSM-SECONDS-KILL-API                // seckill open api
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€SSM-SECONDS-KILL-ORDER-CONSUMER     // Kafka consumer module
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€SSM-SECONDS-KILL-SERVICE            // service module
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€SSM-SECONDS-KILL-WEB                // web module
โ”œโ”€โ”€ SSM-SERVICE                                // The service implementation of the dubbo application 
โ”‚   โ”œโ”€โ”€ src/main
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€java/com/crossoverJie/api           // specific code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€controller                       // Heartbeat detection interface
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€dubbo                            // Dubbo related code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€dao                           // dao package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€pojo                          // pojo package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€service                       // service package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€util                          // Toolkit
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€impl                             // implement dubbo API
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€resources                           // configuration file
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€mapping                          // *.mapper configuration file
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€spring                           // Spring related configuration file
โ”œโ”€โ”€ SSM-WEB                                    // web application
โ”‚   โ”œโ”€โ”€ src/main
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€java/com/crossoverJie               // specific code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€controller                       // controller package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€cxf                              // CXF related code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€dao                              // dao package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€enums                            // enum package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€intercept                        // Interceptor
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€kafka                            // Kafka
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€official                      // Official consumption
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€โ”œโ”€โ”€optimization                  // Multi-threaded consumption
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€lucene                           // Lucene related code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€pojo                             // pojo package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€req                              // request package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€res                              // response package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€service                          // service pachage
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€shiro                            // shiro related code
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€util                             // Toolkit
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€vo                               // vo package
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€resources
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€โ”œโ”€โ”€mapping                          // *.mapper configuration file
โ”‚   โ”œโ”€โ”€ โ”œโ”€โ”€webapp                              // front code
โ”œโ”€โ”€ doc
โ”‚   โ”œโ”€โ”€lucene                                  // lucene related code
โ”‚   โ”œโ”€โ”€sql                                     // sql scripts
โ”œโ”€โ”€ .gitignore                                 // gitignore 
โ”œโ”€โ”€ pom.xml                                    // parent pom
โ”œโ”€โ”€ LICENSE               
โ”œโ”€โ”€ README.md               

TODO LIST


Quick Start

  1. Import SQL Script

https://github.com/crossoverJie/SSM/tree/master/doc/sql

Q&A

Does the reliance or code that begins with crossoverJie do not exist?

This is because I have a dependency on my jar package in the project, which is not published to the maven central factory library.

Because there is dependence:

https://github.com/crossoverJie/SSM-REQUEST-CHECK

https://github.com/crossoverJie/SSM-DUBBO-HTTP

https://github.com/crossoverJie/SSM-DUBBO-FILTER

jar.

solution:

  • if you do not need them, please remove it.
  • if you need,flow:

https://github.com/crossoverJie/SSM-REQUEST-CHECK

https://github.com/crossoverJie/SSM-DUBBO-HTTP

and Installed locallyใ€‚


Partial Screenshots

ๅฐ้ข.jpg

dubbo-httpๅฐ้ข.jpg

2.jpg

2017-04-25 15:15:38,968 DEBUG [com.alibaba.dubbo.remoting.transport.DecodeHandler] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation, dubbo version: 2.5.3, current host: 127.0.0.1
2017-04-25 15:15:39,484 DEBUG [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubbo่ฏทๆฑ‚ๆ•ฐๆฎ:{"args":[1],"interfaceName":"com.crossoverJie.api.UserInfoApi","methodName":"getUserInfo"}
2017-04-25 15:15:39,484 INFO [com.crossoverJie.api.impl.UserInfoApiImpl] - ็”จๆˆทๆŸฅ่ฏขId=1
2017-04-25 15:15:39,505 DEBUG [org.mybatis.spring.SqlSessionUtils] - Creating a new SqlSession
2017-04-25 15:15:39,525 DEBUG [org.mybatis.spring.SqlSessionUtils] - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f56b29] was not registered for synchronization because synchronization is not active
2017-04-25 15:15:39,549 DEBUG [org.mybatis.spring.transaction.SpringManagedTransaction] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@778b3121] will not be managed by Spring
2017-04-25 15:15:39,555 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - ==>  Preparing: select id, username, password,roleId from t_user where id = ? 
2017-04-25 15:15:39,591 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - ==> Parameters: 1(Integer)
2017-04-25 15:15:39,616 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - <==      Total: 1
2017-04-25 15:15:39,616 DEBUG [com.alibaba.druid.pool.PreparedStatementPool] - {conn-10003, pstmt-20000} enter cache
2017-04-25 15:15:39,617 DEBUG [org.mybatis.spring.SqlSessionUtils] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f56b29]
2017-04-25 15:15:45,473 INFO [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubboๆ‰ง่กŒๆˆๅŠŸ
2017-04-25 15:15:45,476 DEBUG [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubbo่ฟ”ๅ›žๆ•ฐๆฎ{"args":[{"id":1,"password":"123456","roleId":1,"userName":"crossoverJie"}],"interfaceName":"com.crossoverJie.api.UserInfoApi","methodName":"getUserInfo"}

More Information

Contact Author