Skip to content

Commit a61e105

Browse files
author
Eric Harmeling
committed
Simplified annotations
1 parent 6c269ed commit a61e105

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

roach-data-jpa/src/main/java/io/roach/data/jpa/JpaApplication.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414
import org.slf4j.LoggerFactory;
1515
import org.springframework.boot.CommandLineRunner;
1616
import org.springframework.boot.WebApplicationType;
17-
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
17+
import org.springframework.boot.autoconfigure.SpringBootApplication;
1818
import org.springframework.boot.builder.SpringApplicationBuilder;
19-
import org.springframework.context.annotation.ComponentScan;
20-
import org.springframework.context.annotation.Configuration;
2119
import org.springframework.context.annotation.EnableAspectJAutoProxy;
22-
import org.springframework.core.Ordered;
2320
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
24-
import org.springframework.data.web.config.EnableSpringDataWebSupport;
2521
import org.springframework.hateoas.Link;
2622
import org.springframework.hateoas.config.EnableHypermediaSupport;
2723
import org.springframework.http.HttpEntity;
@@ -30,14 +26,11 @@
3026
import org.springframework.web.client.HttpClientErrorException;
3127
import org.springframework.web.client.RestTemplate;
3228

33-
@EnableAutoConfiguration
3429
@EnableHypermediaSupport(type = EnableHypermediaSupport.HypermediaType.HAL)
3530
@EnableJpaRepositories
3631
@EnableAspectJAutoProxy(proxyTargetClass = true)
37-
@EnableSpringDataWebSupport
38-
@EnableTransactionManagement(order = Ordered.LOWEST_PRECEDENCE - 1)
39-
@Configuration
40-
@ComponentScan
32+
@EnableTransactionManagement
33+
@SpringBootApplication
4134
public class JpaApplication implements CommandLineRunner {
4235
protected static final Logger logger = LoggerFactory.getLogger(JpaApplication.class);
4336

roach-data-jpa/src/main/java/io/roach/data/jpa/RetryableTransactionAspect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@Component
2424
@Aspect
25-
@Order(Ordered.LOWEST_PRECEDENCE - 2)
25+
@Order(Ordered.LOWEST_PRECEDENCE - 1)
2626
public class RetryableTransactionAspect {
2727
protected final Logger logger = LoggerFactory.getLogger(getClass());
2828

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
-- DROP TABLE IF EXISTS account cascade;
2-
-- DROP TABLE IF EXISTS databasechangelog cascade;
3-
-- DROP TABLE IF EXISTS databasechangeloglock cascade;
4-
51
create table account
62
(
73
id int not null primary key default unique_rowid(),
84
balance numeric(19, 2) not null,
95
name varchar(128) not null,
106
type varchar(25) not null
117
);
12-
13-
-- insert into account (id,balance,name,type) values
14-
-- (1, 500.00,'Alice','asset'),
15-
-- (2, 500.00,'Bob','expense'),
16-
-- (3, 500.00,'Bobby Tables','asset'),
17-
-- (4, 500.00,'Doris','expense');

0 commit comments

Comments
 (0)