Skip to content

twentiethcenturygangsta/ourboard

Repository files navigation

Our Board

Our Board is a management page library implemented using the Spring Framework.
With Our Board, you can perform CRUD operations (Create, Read, Update, Delete) on the information stored in the database.
In addition, Our Board automatically recognizes information about database tables and generates management pages for those tables.


Features

  • Automatic recognition of database table information
  • CRUD (Create, Read, Update, Delete) operations for database information
  • Support for search functionality
  • Support for pagination functionality

Installation

For Maven projects, add the following repository and dependency in your pom.xml file

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.twentiethcenturygangsta</groupId>
    <artifactId>ourboard</artifactId>
    <version>1.0.1</version>
</dependency>

For Gradle projects, add the following repository and dependency in your build.gradle file:

repositories {
    ...
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation 'com.github.twentiethcenturygangsta:ourboard:1.0.1'
}

Usage

  1. Add @EnableOurBoard to the class with @SpringBootApplication annotation.
  2. Register a @Bean method.
    @Bean
    public OurBoardClient ourBoardClient() throws Exception {
        UserDatabaseCredentials userDatabaseCredentials = new UserDatabaseCredentials(
                url, //spring.datasource.url
                userName, //spring.datasource.username
                password //spring.datasource.password
        );
        UserCredentials userCredentials = new UserCredentials(
                "dbdbdbdbdbdbdbq", //encryptKey
                "admin", //memberId
                "adminpassword" //password
        );
    
        return OurBoardClient.builder()
                .userDatabaseCredentials(userDatabaseCredentials)
                .userCredentials(userCredentials)
                .build();
    }
  3. Use the @OurBoardEntity annotation on the class with the @Entity annotation.
  4. Write group and description in @OurBoardEntity
    (Group is the group to which the table belongs. Description is a description of the table.)
  5. Use the @OurBoardColumn annotation on the class field with the @OurBoardEntity annotation.
  6. Write description in @OurBoardColumn
    (Description is a description of the column.)
    @Entity
    @OurBoardEntity(group = "AUTHENTICATION AND AUTHORIZATION", description = "Admin Account")
    public class User {
     
         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY)
         @OurBoardColumn(description = "Login Id")
         private Long id;
    
         @OurBoardColumn(description = "Login Password")
         private String pw;
    
         @OurBoardColumn(description = "User Name")
         private String name;
    
         // ...
    }
  7. Access http://localhost:8080/our-board/admin in your browser.
  8. Log in with the ID and password you wrote in the properties file.
  9. Perfect! Now you can conveniently manage your database with Our Board!

License

Our Board is released under the MIT License. See the LICENSE file for details.


Contributing

If you find any issues or have suggestions for improving Our Board, feel free to open a GitHub issue or submit a pull request.
We welcome contributions from the community!!