Skip to content

Commit

Permalink
Greenify stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Sep 23, 2023
1 parent 9e42989 commit 7080571
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .dx/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ lib_cids:
testing: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=libs/testing')[:7] }}"
app_cid: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=apps')[:7] }}"
app_cids:
foo: "{{ lookup('ansible.builtin.pipe', 'git rev-parse HEAD:apps/foo')[:7] }}"
foo: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=apps/foo')[:7] }}"
schema_cid: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=schemas')[:7] }}"
schema_cids:
postgres: "{{ lookup('ansible.builtin.pipe', 'git write-tree --prefix=schemas/postgres')[:7] }}"
Expand Down
2 changes: 1 addition & 1 deletion apps/foo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ COPY app-foo*.jar foo/app.jar
ENTRYPOINT [ \
"java", "-cp", "foo/app.jar:foo/libs/*", \
"-Dconfig.file=foo/application.conf", \
"smecalculus.bezmen.construction.spec.App" \
"smecalculus.bezmen.construction.App" \
]
5 changes: 0 additions & 5 deletions apps/foo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@
<groupId>${project.groupId}</groupId>
<artifactId>construction</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>client</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>messaging</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>storage</artifactId>
Expand Down
52 changes: 34 additions & 18 deletions apps/foo/src/main/java/smecalculus/bezmen/construction/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
import static smecalculus.bezmen.configuration.WebMode.SPRING_MVC;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthContributorAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.aop.AopAutoConfiguration;
import org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand All @@ -27,24 +43,24 @@
import smecalculus.bezmen.validation.EdgeValidator;

@Import({ConfigBeans.class, ValidationBeans.class, MessagingBeans.class, StorageBeans.class})
//@EnableAutoConfiguration(
// exclude = {
// LiquibaseAutoConfiguration.class,
// AopAutoConfiguration.class,
// DataSourceHealthContributorAutoConfiguration.class,
// DiskSpaceHealthContributorAutoConfiguration.class,
// EmbeddedWebServerFactoryCustomizerAutoConfiguration.class,
// PersistenceExceptionTranslationAutoConfiguration.class,
// SpringDataWebAutoConfiguration.class,
// HealthContributorAutoConfiguration.class,
// HttpMessageConvertersAutoConfiguration.class,
// LifecycleAutoConfiguration.class,
// MultipartAutoConfiguration.class,
// PropertyPlaceholderAutoConfiguration.class,
// RestTemplateAutoConfiguration.class,
// TaskExecutionAutoConfiguration.class,
// TaskSchedulingAutoConfiguration.class
// })
@EnableAutoConfiguration(
exclude = {
LiquibaseAutoConfiguration.class,
AopAutoConfiguration.class,
DataSourceHealthContributorAutoConfiguration.class,
DiskSpaceHealthContributorAutoConfiguration.class,
EmbeddedWebServerFactoryCustomizerAutoConfiguration.class,
PersistenceExceptionTranslationAutoConfiguration.class,
SpringDataWebAutoConfiguration.class,
HealthContributorAutoConfiguration.class,
HttpMessageConvertersAutoConfiguration.class,
LifecycleAutoConfiguration.class,
MultipartAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class,
RestTemplateAutoConfiguration.class,
TaskExecutionAutoConfiguration.class,
TaskSchedulingAutoConfiguration.class
})
@Configuration(proxyBeanMethods = false)
public class App {

Expand Down
12 changes: 5 additions & 7 deletions apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/smecalculus/bezmen</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down
11 changes: 11 additions & 0 deletions libs/essentials/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
<groupId>${project.groupId}</groupId>
<artifactId>signatures</artifactId>
</dependency>
<!--VALIDATION-->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<scope>runtime</scope>
</dependency>
<!--CONFIGURATION-->
<dependency>
<groupId>com.typesafe</groupId>
Expand Down
4 changes: 4 additions & 0 deletions libs/messaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Test-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@Configuration(proxyBeanMethods = false)
@ConditionalOnOrmMode(MY_BATIS)
@MapperScan(basePackages = "smecalculus.bezmen.data.mybatis")
@MapperScan(basePackages = "smecalculus.bezmen.storage.mybatis")
public class OrmMyBatisBeans {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@Configuration(proxyBeanMethods = false)
@ConditionalOnOrmMode(SPRING_DATA)
@EnableJdbcRepositories("smecalculus.bezmen.data.springdata")
@EnableJdbcRepositories("smecalculus.bezmen.storage.springdata")
public class OrmSpringDataBeans extends AbstractJdbcConfiguration {

@Bean
Expand Down

0 comments on commit 7080571

Please sign in to comment.