GithubHelp home page GithubHelp logo

liwei0903nn / springblog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raysmond/springblog

0.0 2.0 0.0 1.24 MB

A simple blogging system implemented with Spring Boot/MVC/JPA + Hibernate + MySQL + Redis + Bootstrap + Jade.

Home Page: https://raysmond.com

License: BSD 3-Clause "New" or "Revised" License

Java 71.78% CSS 8.32% HTML 19.90%

springblog's Introduction

SpringBlog

SpringBlog is a very simple and clean-design blog system implemented with Spring Boot. It's one of my learning projects to explore awesome features in Spring Boot web programming. I had put it on production for my personal blog site https://raysmond.com for about one year. Now, I turn to Hexo for my blog site.

There's no demo online. Here's the screenshot of my previous blog homepage.

SpringBlog is powered by many powerful frameworks and third-party projects:

  • Spring Boot and many of Spring familiy (e.g. Spring MVC, Spring JPA, Spring Secruity and etc)
  • Hibernate + MySQL
  • HikariCP - A solid high-performance JDBC connection pool
  • Bootstrap - A very popular and responsive front-end framework
  • Pegdown - A pure-java markdown processor
  • ACE Editor - A high performance code editor which I use to write posts and code.
  • Pygments - A python library for highlighting code syntax
  • Jade4j - Jade is an elegant template language.
  • Webjars - A client-side web libraries packaged into JAR files. A easy way to manage JavaScript and CSS vendors in Gradle.
  • Redis - A very powerful in-memory data cache server.

Development

Before development, please install the following service software:

Edit the spring config profile src/main/resources/application.yml according to your settings.

And start MySQL and Redis first before running the application.

# If you're using Ubuntu server

# Install MySQL
apt-get install mysql-server
service mysql start
mysql -u root -p
>> create database spring_blog;


# Install Python pygments
apt-get install python-pip
pip install pygments
# If you want to enable redis cache
# Install redis server first, you can find instructions
# from https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
service redis_6379 start

This is a Gradle project. Make sure Gradle is installed in your machine. Try gradle -v command. Otherwise install in from http://www.gradle.org/. I recommend you import the source code into Intellij IDE to edit the code.

# Start the web application
./gradlew bootRun

Development

How to import the project into Intellij IDEA and run from the IDE?

  1. Clone the project git clone https://github.com/Raysmond/SpringBlog.git
  2. Download all dependencies cd SpringBlog ./gradlew idea
  3. Open the project in Intellij IDEA.
  4. Run Application.java as Java application.
  5. Preview: http://localhost:9000 Admin: http://localhost:900/admin , the default admin account is: [email protected], password: admin

Lombok is required to run the project. You can install the plugin in Intellij IDEA. Reference: https://github.com/mplushnikov/lombok-intellij-plugin

Deployment

  • Build application jar ./gradlew build, then upload the distribution jar (e.g. build/libs/SpringBlog-0.1.jar) to your remote server.

  • Upload application-production.yml to your server and change it according to your server settings.

  • Run it (Java8 is a must)

    # assuming you have the jar and yml files under current dir
    java -jar SpringBlog-0.1.jar --spring.config.location=application-production.yml
    

License

Modified BSD license. Copyright (c) 2015, Jiankun LEI (Raysmond).

springblog's People

Contributors

raysmond avatar n0sky avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.