Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	admin-tools-core/pom.xml
#	admin-tools-dbbrowser/pom.xml
#	admin-tools-demo-core/pom.xml
#	admin-tools-demo-jar/pom.xml
#	admin-tools-demo-war/pom.xml
#	admin-tools-filebrowser/pom.xml
#	admin-tools-jminix/pom.xml
#	admin-tools-log4j2/pom.xml
#	admin-tools-melody/pom.xml
#	admin-tools-properties/pom.xml
#	admin-tools-quartz/pom.xml
#	admin-tools-security/admin-tools-security-simple/pom.xml
#	pom.xml
  • Loading branch information
andrehertwig committed Apr 8, 2018
2 parents 5673d2c + 44b20fa commit fdffb2d
Show file tree
Hide file tree
Showing 34 changed files with 2,607 additions and 2,069 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Prev Release: 1.1.6.1 - 18.01.2018

Prev Release: 1.1.6.2 - 20.03.2018

Last Release: 1.1.6.3 - 03.04.2018

Prev Release: 1.1.6.3 - 03.04.2018

Last Release: 1.1.6.4 - 08.04.2018

[![Maven Central](https://img.shields.io/maven-central/v/de.chandre.admin-tools/admin-tools-core.svg)](https://mvnrepository.com/artifact/de.chandre.admin-tools)
[![GitHub issues](https://img.shields.io/github/issues/andrehertwig/admintool.svg)](https://github.com/andrehertwig/admintool/issues)
Expand Down Expand Up @@ -62,7 +65,7 @@ Last Release: 1.1.6.3 - 03.04.2018

## Based on
* [Spring Boot 1.3.*](http://projects.spring.io/spring-boot/)
* Since 1.1.2 also Spring Boot 1.4.* is supported
* Since 1.1.2 also Spring Boot 1.4.*+ is supported
* [Admin LTE](https://almsaeedstudio.com/preview)
* [Thymeleaf](http://www.thymeleaf.org/)

Expand All @@ -83,7 +86,7 @@ Include the dependencies in your dependency management. You can find it in [Mave
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-core</artifactId>
<version>1.1.6.3</version>
<version>1.1.6.4</version>
</dependency>
...
```
Expand Down
2 changes: 1 addition & 1 deletion admin-tools-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-core</artifactId>
<version>1.1.6.3</version>
<version>1.1.6.4</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
ui.admintool.core.menu.headline=MAINMENU

ui.admintool.core.modal.error.title=Error
ui.admintool.core.modal.error.text=An Error has been occurred

ui.admintool.core.modal.confirm.title=Confirm
ui.admintool.core.modal.confirm.text=Do you confirm?

ui.admintool.core.modal.btn.save=Save
ui.admintool.core.modal.btn.delete=Delete
ui.admintool.core.modal.btn.close=Close
ui.admintool.core.menu.headline=MAINMENU

ui.admintool.core.modal.error.title=Error
ui.admintool.core.modal.error.text=An Error has been occurred

ui.admintool.core.modal.confirm.title=Confirm
ui.admintool.core.modal.confirm.text=Do you confirm?

ui.admintool.core.modal.btn.save=Save
ui.admintool.core.modal.btn.add=Add
ui.admintool.core.modal.btn.delete=Delete
ui.admintool.core.modal.btn.close=Close
ui.admintool.core.modal.btn.confirm=Confirm
4 changes: 2 additions & 2 deletions admin-tools-dbbrowser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Result will be displayed via jquery.datatables
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-core</artifactId>
<version>1.1.6.3</version>
<version>1.1.6.4</version>
</dependency>
<dependency>
<groupId>de.chandre.admin-tools</groupId>
<artifactId>admin-tools-dbbrowser</artifactId>
<version>1.1.6.3</version>
<version>1.1.6.4</version>
</dependency>
```

Expand Down
21 changes: 19 additions & 2 deletions admin-tools-demo-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<properties>
<log4j2.version>2.9.1</log4j2.version>
<log4j2.version>2.11.0</log4j2.version>
<quartz-version>2.3.0</quartz-version>
</properties>

Expand Down Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>de.chandre.quartz</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
<version>1.0.1</version>
<version>1.0.4</version>
</dependency>

<dependency>
Expand All @@ -114,6 +114,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-spring-boot-starter</artifactId>
<version>1.71.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
Expand All @@ -133,6 +139,17 @@
<artifactId>log4j-web</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.Appender;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.db.ColumnMapping;
import org.apache.logging.log4j.core.appender.db.jdbc.AbstractConnectionSource;
import org.apache.logging.log4j.core.appender.db.jdbc.ColumnConfig;
import org.apache.logging.log4j.core.appender.db.jdbc.ConnectionSource;
import org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.LoggerConfig;
Expand Down Expand Up @@ -125,14 +126,32 @@ public Appender datasourceAppender(DataSource dataSource, AdminToolLog4j2Util lo
final Configuration config = ctx.getConfiguration();

ColumnConfig[] cc = {
ColumnConfig.createColumnConfig(config, "DATE", null, null, "true", null, null),
ColumnConfig.createColumnConfig(config, "LEVEL", "%level", null, null, null, null),
ColumnConfig.createColumnConfig(config, "LOGGER", "%logger", null, null, null, null),
ColumnConfig.createColumnConfig(config, "MESSAGE", "%message", null, null, null, "true"),
ColumnConfig.createColumnConfig(config, "EXCEPTION", "%ex{full}", null, null, null, "true"),
ColumnConfig.newBuilder().setConfiguration(config).setName("DATE").setEventTimestamp(true).build(),
ColumnConfig.newBuilder().setConfiguration(config).setName("LEVEL").setPattern("%level").build(),
ColumnConfig.newBuilder().setConfiguration(config).setName("LOGGER").setPattern("%logger").build(),
ColumnConfig.newBuilder().setConfiguration(config).setName("MESSAGE").setPattern("%message").setClob(true).build(),
ColumnConfig.newBuilder().setConfiguration(config).setName("EXCEPTION").setPattern("%ex{full}").setClob(true).build()
};

Appender appender = JdbcAppender.createAppender("databaseAppender", "false", null, new Connect(dataSource), "0", "LOGGING", cc);
Appender appender = JdbcAppender.newBuilder()
.setBufferSize(0)
.setColumnConfigs(cc)
.setColumnMappings(new ColumnMapping[]{})
.setConnectionSource(new Connect(dataSource))
.setTableName("LOGGING")
.withName("databaseAppender")
.withIgnoreExceptions(false)
.build();

// ColumnConfig[] cc = {
// ColumnConfig.createColumnConfig(config, "DATE", null, null, "true", null, null),
// ColumnConfig.createColumnConfig(config, "LEVEL", "%level", null, null, null, null),
// ColumnConfig.createColumnConfig(config, "LOGGER", "%logger", null, null, null, null),
// ColumnConfig.createColumnConfig(config, "MESSAGE", "%message", null, null, null, "true"),
// ColumnConfig.createColumnConfig(config, "EXCEPTION", "%ex{full}", null, null, null, "true"),
// };
// Appender appender = JdbcAppender.createAppender("databaseAppender", "false", null, new Connect(dataSource), "0", "LOGGING", cc);

appender.start();
config.addAppender(appender);
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
Expand All @@ -154,11 +173,12 @@ public Appender datasourceAppender(DataSource dataSource, AdminToolLog4j2Util lo
}

// inner class
class Connect implements ConnectionSource {
class Connect extends AbstractConnectionSource {
private DataSource dsource;

public Connect(DataSource dsource) {
this.dsource = dsource;
setState(State.STARTED);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package de.chandre.admintool;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

import org.springframework.stereotype.Component;

import de.chandre.admintool.core.AdminToolConfig;

@Component
public class ExampleMXBean implements AdminToolConfig {

public Date getDate() {
return new Date();
}

public LocalDate getLocalDate() {
return LocalDate.now();
}

public LocalDateTime getLocalDateTime() {
return LocalDateTime.now();
}

public Double getDouble() {
return Double.valueOf(123.456d);
}

public double getPrimitiveDouble() {
return 654.321d;
}

@Override
public void printConfig() {

}

@Override
public boolean isEnabled() {
return true;
}
}

This file was deleted.

23 changes: 22 additions & 1 deletion admin-tools-demo-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<jminix.version>1.2.0</jminix.version>
<log4j2.version>2.6.2</log4j2.version>
<log4j2.version>2.11.0</log4j2.version>
</properties>

<dependencies>
Expand All @@ -42,6 +42,27 @@
<artifactId>flyway-core</artifactId>
<version>4.1.0</version><!--$NO-MVN-MAN-VER$-->
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>

</dependencies>

Expand Down
Loading

0 comments on commit fdffb2d

Please sign in to comment.