In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to use the common development framework of Java. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Seezoon Stack aims at rapid development, making certain choices in terms of development speed and code structure. in any case, you will see very authentic Java development frameworks used.
Partial effect picture:
Technology selection
Seezoon Stack is completed by using the most cutting-edge front and rear technology stack.
The main backstage framework:
Frame name frame address description Spring Boot https://spring.io/projects/spring-boot automatic assembly Spring Session Data Redis https://spring.io/projects/spring-session-data-redis login management Spring Security https://spring.io/projects/spring-security login and permission control Mybatis https://mybatis.org/mybatis-3/zh/index.html persistence layer Springfox https://github.com/springfox/springfoxopenAPI 3 document features
JSR303 validation, standard API model, error code, exception handling encapsulation
Request burying point, go back to add X-Trace-Id, and bury thread ID in log through MDC.
Redis encapsulation, serialization
RestTemplate thread pool, certificate request, and default property convention
Spring Boot Asynchronous Thread configuration
Cross-domain support
Automatic document Generation based on openAPI 3.0Specification
Front and rear integrated code generation
Login and access control
File processing, support disk files and Aliyun OSS
Internationalization
General data permissions
Dynamic menu & Button
Features with lower priority (TODO):
Ali Yun SMS
Excel processing
Wechat official account, Mini Program related, login, payment and other common encapsulation
Cloud native deployment and orchestration documentation
The main framework of the front desk:
Frame name frame address description Vue 3 https://v3.cn.vuejs.org/guide/introduction.html two-way binding Vite https://cn.vitejs.dev/ Construction tool Ant Design Vue 2 https://2x.antdv.com/components/overview-cn/ component TypeScript 4 https://www.typescriptlang.org/zh/JavaScript superset Windi Css https://windicss.org/guide/css Auxiliary Class Iconify https://iconify.design/ Icon Library
The front-end framework, fork Vue vben admin 2.0, periodically incorporates upstream features. Please refer to the Vben admin documentation for specific components. I would also like to thank Vben admin for his help to the project.
The front end mainly uses Ant Design Vue 2 as the main component library to reduce the learning cost, the main framework is TypeScript, and the business functions are written in JavaScript. The amount of JavaScript code for rapid development is simple and fast.
Environmental preparation
JDK 1.8 + (recommendation 11)
Maven 3 +
Node 12 +
Yarn (after installing node, npm install-g yarn is available)
Redis
Mysql 5.7 + (recommendation 8)
? Quick start
Code download
You can import it through IDEA File- > New- > Project From Version Control, or you can download it with the command and import it.
It is recommended that you import it after fork to your own warehouse to facilitate subsequent synchronous updates.
Git clone https://github.com/734839030/seezoon-stack.git
Engineering structure
```.└── seezoon-stack parent project ├── build build required files │ ├── assembly generate product structure │ │ ├── bin project script │ │ ├── conf configuration directory │ │ ├── logs log directory │ │ └── assembly.xml maven assembly packaging plug-in description File (not packaged into production) │ ├── build.sh build script │ ├── eclipse-codestyle.xml P3C code format You can update the setting configuration of │ ├── maven-settings.xml maven (optional) │ └── mybatis-generator-config.xml native mybatis-generator description file (optional) ├── db DB script directory ├── doc project documentation and data maintenance directory ├── seezoon-admin-server management end service ├── seezoon-admin-web background page currently upstream fork Merge the ├── seezoon-dao DAO layer after maintaining the stability of the code base alone It is convenient for management side and C side to refer to ├── seezoon-framework management side and C side general framework layer (basic middleware, parameter verification, security control) ├── seezoon-generator general code generator, which can be used alone or inherited by other components to use └── seezoon-user-server C side server TODO``` background.
Initialize DB script
For the script, see db/seezoon-stack.sql
Configure seezoon-admin-server
Configure the DB and Redis account passwords in the following configuration file
Seezoon-admin-server/src/main/resources/application-local.properties
Start the background in IDEA
Execute the Main method in the following class (if a dependency error is reported, you can execute the parent project mvn package)
Seezoon-admin-server/src/main/java/com/seezoon/admin/AdminMain.java
Front Desk
Install dependencies and start
Cd seezoon-stack/seezoon-admin-webyarn installyarn serve # access address http://localhost:3100/
Local test file server (optional)
After the cd seezoon-admin-web/test/server/uploadyarn installyarn start# manager uploads the file, it can directly access the address static directory static file http://localhost:3001/static/xxxx
Deployment of production environment
Online directory structure
/ data/ │── cert ├── seezoon-admin-server # backend product │ ├── bin │ ├── conf │ ├── logs │ └── work ├── seezoon-admin-web # frontend product │ ├── assets │ └── resource └── upload-server file upload directory. Disk file is used by default, but OSS is not required. Manual deployment-background
Java 1.8 + is installed in online environment, and 11 is recommended.
Using maven-assembly-plugin to generate the build, you can directly generate the directory structure of production deployment, which is convenient for DevOps integration.
Cd seezoon-admin-servermvn clean package
Product catalogue
Seezoon-admin-server/target/seezoon-admin-server
You only need to maintain the application.properties of the conf directory of the product, and then you can publish it.
The configuration file is separated from the environment, and the jar of the packaged product of maven-jar-plugin will discharge the following files from the resources directory:
Application-local.propertieslogback-spring.xml
If you don't mind that each environment configuration is in the project, use the spring.profiles.active provided by spring boot and select the configuration file in the startup command.
Manual deployment-Front desk cd seezoon-admin-webyarn build
Product
The files in seezoon-admin-web/dist can be published to the online nginx directory. The nginx configuration of the project is as follows, for reference only.
Upstream seezoon-admin-server {server 127.0.0.1 server 8080 max_fails=3 fail_timeout=10s;} server {listen 80; server_name stack.seezoon.com; rewrite ^ (. *) $https://$host$1 permanent;} server {listen 443; server_name stack.seezoon.com; ssl on; ssl_certificate / data/cert/stack.seezoon.com.pem; ssl_certificate_key / data/cert/stack.seezoon.com.key Ssl_session_timeout 5m; ssl_ciphers api location api location ^ ~ / api/ {proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr Proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://seezoon-admin-server/;} # File Service location ^ / file/ {access_log off; alias / data/upload-server/;} # static Resource location / {access_log off Root / data/seezoon-admin-web/; index index.html index.htm;}}
Optional static resource compression configuration, placed under the nginx.conf http node.
# Open gzip for better results: gzip on;gzip_min_length 1k MSIE buffers 4 16k position gzipboards httppets version 1.0 politics gzipsets compounding level 6 countries gzipsets types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;gzip_vary off;gzip_disable "MSIE [1-6]\. How to contribute
You are very welcome to join us! Mention an Issue or submit a Pull Request.
Pull Request:
Fork code! (synchronous upstream: git pull https://github.com/734839030/seezoon-stack.git master)
Create your own branch: git checkout-b feat/xxxx
Submit your changes: git commit-m'feat (function): add xxxxx'
Push your branch: git push origin feat/xxxx
Submit pull request
Git contribution submission specification
Reference Specification (Angular)
-new features added to `fix`-problems related to BUG- `style` code style that do not affect the running results-`perf` optimization / performance improvement-`refactor` refactor`-`refactor` undo modifications-`test` test-related-`docs` documentation / comments-`chore` dependent updates / scaffolding configuration modifications, etc.-`workflow` workflow improvement-`ci` continuous integration-`types` type definition file changes-`wip` share here about the use of common Java development frameworks in development. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.