For a developer who doesn’t possess a designer brain, it must be hard to create an interface for your web. But, don’t let that stop you from learning! You can use available design template, such as Bootstrap.

If you have already had specific admin feature in your mind, there is a good template for creating admin pages. Here it is, AdminLTE. From button, till form design are available. Honestly, there is no good documentation how to implement this design inside Spring project. I spent a lot of time to search and retest it until I can display the design on my web.

How to use AdminLTE

Download the resources from the official website. You will receive CSS, JS, sample page etc in one file. I assume you’ve generated the Spring Boot project with Thymeleaf library dependencies. If you haven’t, please check this preparation step.

  • In your project explorer, go to src > main > resources > static.
  • Now, extract AdminLTE file package that you downloaded, and copy following file to above location in project explorer:
    • bower_components
    • dist
    • plugins
  • Create home index file under src > main > resources > templates
  • Create controller file under src > main > java > …. > project_name. Create new folder named Controller and put the controller file inside for easier file organization.
  • Run localhost:portnumber in your browser. For me, I set default 8080 as port number. You can edit this configuration in

If you found error, check your build.gradle and configuration. Don’t forget to check the error log.


<html xmlns="" 
  <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html" />
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
  <title>Welcome to MoM Analysis </title>
  <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css"/>
  <link rel="stylesheet" type="text/css" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" />

  <link rel="stylesheet" type="text/css" media="all" th:href="@{/css/main.css}" href="../../css/main.css" />
  <nav class="navbar navbar-inverse">
    <div class="container">
      <div class="navbar-header">
        <a class="navbar-brand" href="#">MoJacko</a>
      <div id="navbar" class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
          <li class="active"><a th:href="@{/}">Home</a></li>
          <li><a th:href="@{/login}">Login</a></li>
  <div class="container">
    <div class="starter-template">
      <h1>Select Menu: </h1>
      <h2>Manage <a th:href="@{/admin}">Admin System</a></h2>
      <h2>Analyze <a th:href="@{/user}">new MoM</a></h2>
  <div th:replace="fragments/footer :: footer"/>


<html xmlns="" 

  <div th:fragment="footer">
    <div class="container">
      <!-- this is footer -->
        	© 2018 Mojacko Planet
        	<span sec:authorize="isAuthenticated()">
        		| Logged User: <span sec:authentication="name"></span> | 
        		Roles: <span sec:authentication="principal.authorities"></span> |
        		<a th:href="@{/logout}">Sign Out</a>
        	<script type="text/javascript"

package com.ninan.mojacko.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

public class PageController {
  public String main() {
    return "home";

#Server Configuration


#Database Configuration
spring.datasource.url=jdbc:mariadb://[my_database_url] spring.datasource.username=username


#Thymeleaf Config

When I run on browser