Skip to content

Commit

Permalink
0.5.3 pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
TruthBean committed Nov 14, 2021
1 parent a024359 commit f63dba7
Show file tree
Hide file tree
Showing 45 changed files with 127 additions and 41 deletions.
2 changes: 1 addition & 1 deletion boot/cron/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.truthbean.debbie.env.EnvContentAware;
import com.truthbean.debbie.env.EnvironmentContent;
import com.truthbean.LoggerFactory;
import com.truthbean.debbie.env.EnvironmentContentHolder;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;
Expand All @@ -40,7 +41,9 @@ public Scheduler getBean() {
if (scheduler == null) {
synchronized (SchedulerBeanFactory.class) {
if (scheduler == null) {
envContent.addProperty("org.quartz.threadPool.threadCount", "10");
if (envContent instanceof EnvironmentContentHolder) {
((EnvironmentContentHolder)envContent).addProperty("org.quartz.threadPool.threadCount", "10");
}
try {
StdSchedulerFactory factory = new StdSchedulerFactory(envContent.getProperties());
this.scheduler = factory.getScheduler();
Expand Down
2 changes: 1 addition & 1 deletion boot/freemarker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class FreemarkerTest {

public static void main(String[] args) {
var application = ApplicationFactory.create(FreemarkerTest.class, args);
var application = ApplicationFactory.factory(FreemarkerTest.class, args);
application.start();
}
}
2 changes: 1 addition & 1 deletion boot/hikari/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion boot/javafx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package com.truthbean.debbie.javafx;

import com.truthbean.LoggerFactory;
import com.truthbean.logger.LoggerConfig;
import javafx.application.Application;
import javafx.stage.Stage;

Expand All @@ -22,7 +23,7 @@ public class DebbieJavaFxApplication extends Application {

static {
System.setProperty("javafx.sg.warn", "true");
System.setProperty(LoggerFactory.NO_LOGGER, "true");
System.setProperty(LoggerConfig.NO_LOGGER, "true");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.truthbean.LoggerFactory;
import com.truthbean.debbie.boot.DebbieApplication;
import com.truthbean.debbie.boot.DebbieBootApplication;
import com.truthbean.logger.LoggerConfig;

/**
* @author TruthBean/Rogar·Q
Expand All @@ -22,7 +23,7 @@
public class DemoApplication {

static {
System.setProperty(LoggerFactory.NO_LOGGER, "true");
System.setProperty(LoggerConfig.NO_LOGGER, "true");
}

public static void main(String[] args) {
Expand Down
2 changes: 1 addition & 1 deletion boot/kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
@PropertiesConfiguration(keyPrefix = "debbie.kafka")
public class KafkaConfiguration implements DebbieConfiguration {

private String name = "default";

private boolean enable = true;

@PropertyInject(value = "bootstrap-servers", transformer = ListStringTransformer.class)
Expand Down Expand Up @@ -190,6 +192,15 @@ public Properties toConsumerProperties() {
}
}

@Override
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public boolean isEnable() {
return enable;
}
Expand Down
2 changes: 1 addition & 1 deletion boot/lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
public class LuceneConfiguration implements DebbieConfiguration {

private String name = "default";

private String dataPath;

public String getDataPath() {
Expand All @@ -28,6 +30,15 @@ public void setDataPath(String dataPath) {
this.dataPath = dataPath;
}

@Override
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Override
public void reset() {

Expand Down
2 changes: 1 addition & 1 deletion boot/metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion boot/mybatis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @since 0.0.2
*/
public class MybatisConfiguration implements DebbieConfiguration {
private String name = "default";
private String mybatisConfigXmlLocation;

private List<String> mapperLocations;
Expand All @@ -45,6 +46,15 @@ public class MybatisConfiguration implements DebbieConfiguration {
private DatabaseIdProvider databaseIdProvider;
private Cache cache;

@Override
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getMybatisConfigXmlLocation() {
return mybatisConfigXmlLocation;
}
Expand Down
2 changes: 1 addition & 1 deletion boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-cloud</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion boot/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ServletApplicationInitializer() {
super.config(ServletApplicationInitializer.class);
super.callStarter();
} else {
applicationContext = debbieApplicationFactory.getApplicationContext();
applicationContext = super.getApplicationContext();
}
}

Expand Down
2 changes: 1 addition & 1 deletion boot/spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import com.truthbean.Logger;
import com.truthbean.debbie.bean.BeanInfo;
import com.truthbean.debbie.bean.BeanInfoFactory;
import com.truthbean.debbie.bean.BeanScanConfiguration;
import com.truthbean.debbie.boot.DebbieApplication;
import com.truthbean.debbie.core.ApplicationContext;
import com.truthbean.debbie.core.ApplicationFactory;
import com.truthbean.LoggerFactory;
Expand Down Expand Up @@ -43,8 +45,11 @@ public class DebbieBeanRegistrar implements ImportBeanDefinitionRegistrar, BeanC

private ClassLoader classLoader;

private final ApplicationFactory applicationFactory;

public DebbieBeanRegistrar() {
LOGGER.debug(() -> "enable debbie bean by spring");
applicationFactory = ApplicationFactory.newEmpty();
}

@Override
Expand All @@ -65,12 +70,15 @@ public void registerBeanDefinitions(@NonNull AnnotationMetadata importingClassMe
String[] excludePackages = (String[]) mapperScanAttrs.get("excludePackages");
Class<?>[] excludeClasses = (Class<?>[]) mapperScanAttrs.get("excludeClasses");

ApplicationFactory applicationFactory = ApplicationFactory.configure(classLoader, configuration -> {
configuration.addScanBasePackages(basePackages);
configuration.addScanClasses(classes);
configuration.addScanExcludeClasses(excludeClasses);
configuration.addScanExcludePackages(excludePackages);
});
applicationFactory.init(classLoader);

BeanScanConfiguration configuration = new BeanScanConfiguration();
configuration.addScanBasePackages(basePackages);
configuration.addScanClasses(classes);
configuration.addScanExcludeClasses(excludeClasses);
configuration.addScanExcludePackages(excludePackages);

applicationFactory.config(configuration);
ApplicationContext applicationContext = applicationFactory.getApplicationContext();
BeanInfoFactory debbieBeanInfoFactory = applicationContext.getBeanInfoFactory();
Set<BeanInfo<?>> allDebbieBeanInfo = debbieBeanInfoFactory.getAllDebbieBeanInfo();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.truthbean.debbie.spring.check;

import com.truthbean.debbie.boot.DebbieApplication;
import com.truthbean.debbie.boot.DebbieBootApplication;

/**
* @author TruthBean
* @since 0.5.3
*/
@DebbieBootApplication
public class DebbieApplicationTest {

static {
System.setProperty(DebbieApplication.DISABLE_DEBBIE, "true");
System.setProperty("logging.level.com.truthbean", "debug");
System.setProperty("logging.level.org.springframework", "debug");
}

public static void main(String[] args) {
DebbieApplication.run(DebbieApplicationTest.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package com.truthbean.debbie.spring.check;

import com.truthbean.debbie.boot.DebbieApplication;
import com.truthbean.debbie.spring.EnableDebbieApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
Expand All @@ -23,9 +24,10 @@
@ComponentScan(basePackages = "com.truthbean", includeFilters = {
@ComponentScan.Filter(type = FilterType.CUSTOM, classes = TruthBeanTypeFilter.class)
})
// @EnableDebbieApplication
@EnableDebbieApplication
public class DebbieSpringTest {
static {
System.setProperty(DebbieApplication.DISABLE_DEBBIE, "false");
System.setProperty("logging.level.com.truthbean", "debug");
System.setProperty("logging.level.org.springframework", "debug");
}
Expand Down
2 changes: 1 addition & 1 deletion boot/swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
public class SwaggerApplication {
public static void main(String[] args) {
var application = ApplicationFactory.create(SwaggerApplication.class, args);
application.start();
application.factory().start();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public Info openAPI() {
.license(new License()
.name("Apache 2.0")
.url("http://www.apache.org/licenses/LICENSE-2.0.html"))
.version("0.5.2-RELEASE");
.version("0.5.3-RELEASE");
}
}
2 changes: 1 addition & 1 deletion boot/swagger/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ debbie.swagger.info.title=Debbie Swagger Example
debbie.swagger.info.description=This is a sample of the debbie framework using swagger. \
You can find out more about Swagger at [http://swagger.io](http://swagger.io) .
debbie.swagger.info.terms-of-service=http://swagger.io/terms
debbie.swagger.info.version=0.5.2-RELEASE
debbie.swagger.info.version=0.5.3-RELEASE
debbie.swagger.info.contact.name=debbie-swagger
debbie.swagger.info.contact.email=[email protected]
debbie.swagger.info.contact.url=http://www.truthbean.com/debbie-swagger
Expand Down
2 changes: 1 addition & 1 deletion boot/tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>debbie-boot</artifactId>
<groupId>com.truthbean</groupId>
<version>0.5.2-RELEASE</version>
<version>0.5.3-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit f63dba7

Please sign in to comment.