- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 Spring boot 2.1.0 RELEASE
创建了新项目,我的 pom.xml
包含此
..
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
..
我使用 LocalContainerEntityManagerFactoryBean
配置它,但没有 application.properties
文件:
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
em.setPackagesToScan("com.xxxx.api.model");
em.setPersistenceUnitName("xxxx-pu");
Properties prop = new Properties();
prop.putAll(getVendorProperties());
em.setJpaVendorAdapter(vendorAdapter);
em.setJpaProperties(prop);
return em;
}
protected Map<String, String> getVendorProperties() {
final Map<String, String> ret = new HashMap<>();
ret.put(PersistenceUnitProperties.BATCH_WRITING, BatchWriting.JDBC);
ret.put(PersistenceUnitProperties.WEAVING, "false");
ret.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");
ret.put(PersistenceUnitProperties.DDL_GENERATION, PersistenceUnitProperties.DROP_AND_CREATE);
return ret;
}
我在 com.xxxx.api.model
Account.java
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="ACCOUNT")
public class Account{
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@XmlAttribute
@Basic(optional = false)
@Column(name = "ID", nullable = false)
private Long id;
private String username;
private String password;
}
通过使用这些配置和类,我无法自动生成 ddl。
输出日志如下所示:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2019-12-27 01:47:19.447 INFO 31168 --- [ main] com.xxxx.api.ApiApplication : Starting ApiApplication on server with PID 31168 (/home/user/NetBeansProjects/xxxx-api/target/classes started by user in /home/user/NetBeansProjects/xxxx-api)
2019-12-27 01:47:19.451 INFO 31168 --- [ main] com.xxxx.api.ApiApplication : No active profile set, falling back to default profiles: default
2019-12-27 01:47:20.211 INFO 31168 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-12-27 01:47:20.233 INFO 31168 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces.
2019-12-27 01:47:20.962 INFO 31168 --- [ main] com.xxxx.api.config.Environment : Env: null
2019-12-27 01:47:20.962 INFO 31168 --- [ main] com.xxxx.api.config.Environment : Level 4:
2019-12-27 01:47:20.962 INFO 31168 --- [ main] com.xxxx.api.config.Environment : Property : development
2019-12-27 01:47:20.965 INFO 31168 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'envConfig' of type [com.xxxx.api.config.Environment] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.028 INFO 31168 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [org.springframework.jdbc.datasource.DriverManagerDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.032 INFO 31168 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'JPAConfig' of type [com.xxxx.api.config.JPAConfig$$EnhancerBySpringCGLIB$$9bc8315d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.146 INFO 31168 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$7e9c54] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-27 01:47:21.712 INFO 31168 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-12-27 01:47:21.741 INFO 31168 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-12-27 01:47:21.741 INFO 31168 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/9.0.12
2019-12-27 01:47:21.751 INFO 31168 --- [ main] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2019-12-27 01:47:21.860 INFO 31168 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-12-27 01:47:21.861 INFO 31168 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2325 ms
2019-12-27 01:47:21.922 INFO 31168 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-12-27 01:47:21.923 INFO 31168 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-12-27 01:47:21.924 INFO 31168 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'formContentFilter' to: [/*]
2019-12-27 01:47:21.925 INFO 31168 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-12-27 01:47:21.925 INFO 31168 --- [ main] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2019-12-27 01:47:21.926 INFO 31168 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-12-27 01:47:23.821 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOGLOCK
2019-12-27 01:47:23.825 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOGLOCK
2019-12-27 01:47:23.829 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT `LOCKED` FROM xxxx.DATABASECHANGELOGLOCK WHERE ID=1
2019-12-27 01:47:23.850 INFO 31168 --- [ main] l.lockservice.StandardLockService : Successfully acquired change log lock
2019-12-27 01:47:25.618 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT MD5SUM FROM xxxx.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2019-12-27 01:47:25.619 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM xxxx.DATABASECHANGELOG
2019-12-27 01:47:25.620 INFO 31168 --- [ main] l.c.StandardChangeLogHistoryService : Reading from xxxx.DATABASECHANGELOG
2019-12-27 01:47:25.621 INFO 31168 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT * FROM xxxx.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2019-12-27 01:47:25.627 INFO 31168 --- [ main] l.lockservice.StandardLockService : Successfully released change log lock
[EL Fine]: server: 2019-12-27 01:47:25.981--Thread(Thread[main,5,main])--Configured server platform: org.eclipse.persistence.platform.server.NoServerPlatform
[EL Finest]: jpa: 2019-12-27 01:47:25.993--ServerSession(1340776217)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Initial; factoryCount 0
[EL Finest]: properties: 2019-12-27 01:47:25.994--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.orm.throw.exceptions; default value=true
[EL Finest]: properties: 2019-12-27 01:47:25.995--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-emf; value=false
[EL Finest]: properties: 2019-12-27 01:47:25.995--ServerSession(1340776217)--Thread(Thread[main,5,main])--property=eclipselink.multitenant.tenants-share-cache; default value=false
[EL Finer]: metadata: 2019-12-27 01:47:26.01--Thread(Thread[main,5,main])--Searching for mapping file: [META-INF/orm.xml] at root URL: [file:/home/user/NetBeansProjects/xxxx-api/target/classes/].
[EL Finer]: metadata: 2019-12-27 01:47:26.014--Thread(Thread[main,5,main])--Searching for mapping file: [META-INF/eclipselink-orm.xml] at root URL: [file:/home/user/NetBeansProjects/xxxx-api/target/classes/].
[EL Config]: metadata: 2019-12-27 01:47:26.114--ServerSession(1340776217)--Thread(Thread[main,5,main])--The access type for the persistent class [class com.xxxx.api.model.Account] is set to [FIELD].
[EL Config]: metadata: 2019-12-27 01:47:26.136--ServerSession(1340776217)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.xxxx.api.model.Account] is being defaulted to: Account.
[EL Config]: metadata: 2019-12-27 01:47:26.154--ServerSession(1340776217)--Thread(Thread[main,5,main])--The column name for element [password] is being defaulted to: PASSWORD.
[EL Config]: metadata: 2019-12-27 01:47:26.156--ServerSession(1340776217)--Thread(Thread[main,5,main])--The column name for element [username] is being defaulted to: USERNAME.
[EL Finest]: jpa: 2019-12-27 01:47:26.168--ServerSession(1340776217)--Thread(Thread[main,5,main])--End predeploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Predeployed; factoryCount 1
[EL Finer]: metamodel: 2019-12-27 01:47:26.176--ServerSession(1340776217)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.Account_] not found during initialization.
[EL Finer]: metamodel: 2019-12-27 01:47:26.177--ServerSession(1340776217)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.BaseModel_] not found during initialization.
2019-12-27 01:47:26.177 INFO 31168 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'xxxx-pu'
2019-12-27 01:47:26.533 INFO 31168 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-12-27 01:47:27.020 INFO 31168 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: eaf18e76-a0bc-4afd-853a-2ee7138da3dc
2019-12-27 01:47:27.212 INFO 31168 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7ec5d3e1, org.springframework.security.web.context.SecurityContextPersistenceFilter@694dc99b, org.springframework.security.web.header.HeaderWriterFilter@518ed9b4, org.springframework.security.web.csrf.CsrfFilter@31c800a5, org.springframework.security.web.authentication.logout.LogoutFilter@590ab84, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1f7853af, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@342a5b57, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@3b235623, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@153cf928, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6d71f296, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@51a73873, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@3ddc5a75, org.springframework.security.web.session.SessionManagementFilter@20e73e41, org.springframework.security.web.access.ExceptionTranslationFilter@4a49ce3a, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@17d25e1d]
2019-12-27 01:47:27.428 INFO 31168 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-12-27 01:47:27.433 INFO 31168 --- [ main] com.xxxx.api.ApiApplication : Started ApiApplication in 8.813 seconds (JVM running for 9.538)
如果我将 pom.xml 的 spring.boot.version
更改为 2.0.9.RELEASE
,它可以正常工作并生成 ACCOUNT
表格也是如此。
最佳答案
我发现了这个问题。从 Spring Boot 2.1.0.RELEASE
开始,Eclipselink 的持久性单元部署仅在我们点击任何 REST Controller 端点后才会发生。因此,我更改了代码以在应用程序准备就绪后对其进行初始化。这是一种很古怪的方式,但很有效。
public class JPAConfig implements ApplicationContextAware {
// ...
private ApplicationContext context;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.context = applicationContext;
}
@EventListener(ApplicationReadyEvent.class)
public void startup() {
EntityManager bean = this.context.getBean(EntityManager.class);
try {
bean.clear();
}catch (Exception e){
e.printStackTrace();
}
}
//...
}
运行此命令后,我得到如下日志:
EL Finest]: jpa: 2019-12-27 17:49:05.083--ServerSession(1197389053)--Thread(Thread[main,5,main])--Begin deploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Predeployed; factoryCount 1
[EL Finer]: server: 2019-12-27 17:49:05.11--Thread(Thread[main,5,main])--Detected server platform: org.eclipse.persistence.platform.server.NoServerPlatform.
[EL Finer]: 2019-12-27 17:49:05.111--Thread(Thread[main,5,main])--initializing session manager
[EL Finer]: server: 2019-12-27 17:49:05.112--ServerSession(1197389053)--Thread(Thread[main,5,main])--Detected server platform: org.eclipse.persistence.platform.server.NoServerPlatform.
[EL Finest]: properties: 2019-12-27 17:49:05.113--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=ALL
[EL Finest]: properties: 2019-12-27 17:49:05.113--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=ALL
[EL Finest]: properties: 2019-12-27 17:49:05.116--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.cache.query-results; value=false
[EL Finest]: properties: 2019-12-27 17:49:05.117--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.cache.shared.default; value=false
[EL Finest]: properties: 2019-12-27 17:49:05.117--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.jdbc.batch-writing; value=JDBC
[EL Finest]: properties: 2019-12-27 17:49:05.118--ServerSession(1197389053)--Thread(Thread[main,5,main])--property=eclipselink.session.customizer; value=com.xxxx.api.config.CamelCaseSessionCustomizer
[EL Info]: 2019-12-27 17:49:05.12--ServerSession(1197389053)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.6.3.v20160428-59c81c5
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle12Platform, regular expression: (?is)oracle.*12.*
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle11Platform, regular expression: (?is)oracle.*11.*
[EL Finest]: connection: 2019-12-27 17:49:05.164--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform, regular expression: (?is)oracle.*10.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.Oracle9Platform, regular expression: (?is)oracle.*9.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.oracle.OraclePlatform, regular expression: (?is)oracle.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SQLAnywherePlatform, regular expression: SQL\ Anywhere.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SybasePlatform, regular expression: (?i)(sybase.*)|(adaptive\ server\ enterprise.*)|(SQL\ Server.*)
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.SQLServerPlatform, regular expression: (?i)microsoft.*
[EL Finest]: connection: 2019-12-27 17:49:05.165--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.JavaDBPlatform, regular expression: (?i).*derby.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2ZPlatform, regular expression: (?i).*db2.*dsn.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2MainframePlatform, regular expression: (?i).*db2.*qsq.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.DB2Platform, regular expression: (?i).*db2.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.PointBasePlatform, regular expression: (?is)pointbase.*
[EL Finest]: connection: 2019-12-27 17:49:05.166--Thread(Thread[main,5,main])--Database platform: org.eclipse.persistence.platform.database.MySQLPlatform, regular expression: (?i)mysql.*
[EL Fine]: connection: 2019-12-27 17:49:05.167--Thread(Thread[main,5,main])--Detected database platform: org.eclipse.persistence.platform.database.MySQLPlatform
[EL Config]: connection: 2019-12-27 17:49:05.222--ServerSession(1197389053)--Connection(595285180)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
platform=>MySQLPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection: 2019-12-27 17:49:05.247--ServerSession(1197389053)--Connection(156850393)--Thread(Thread[main,5,main])--Connected: jdbc:mysql://localhost:3306/xxxx?nullNamePatternMatchesAll=true&useUnicode=true&character_set_server=utf8mb4&useLegacyDatetimeCode=false&useTimezone=true&serverTimezone=GMT
User: root@localhost
Database: MySQL Version: 5.7.28-0ubuntu0.18.04.4
Driver: MySQL Connector/J Version: mysql-connector-java-8.0.17 (Revision: 16a712ddb3f826a1933ab42b0039f7fb9eebc6ec)
[EL Finest]: connection: 2019-12-27 17:49:05.248--ServerSession(1197389053)--Connection(1895707642)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.249--ServerSession(1197389053)--Connection(1895707642)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Config]: connection: 2019-12-27 17:49:05.249--ServerSession(1197389053)--Connection(1039835620)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
platform=>MySQLPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection: 2019-12-27 17:49:05.27--ServerSession(1197389053)--Connection(1160393458)--Thread(Thread[main,5,main])--Connected: jdbc:mysql://localhost:3306/xxxx?nullNamePatternMatchesAll=true&useUnicode=true&character_set_server=utf8mb4&useLegacyDatetimeCode=false&useTimezone=true&serverTimezone=GMT
User: root@localhost
Database: MySQL Version: 5.7.28-0ubuntu0.18.04.4
Driver: MySQL Connector/J Version: mysql-connector-java-8.0.17 (Revision: 16a712ddb3f826a1933ab42b0039f7fb9eebc6ec)
[EL Finest]: sequencing: 2019-12-27 17:49:05.292--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_Transaction_NoAccessor_State
[EL Finest]: sequencing: 2019-12-27 17:49:05.292--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequence SEQUENCE: preallocation size 50
[EL Finest]: sequencing: 2019-12-27 17:49:05.293--ServerSession(1197389053)--Thread(Thread[main,5,main])--sequence SEQ_GEN: preallocation size 50
[EL Info]: connection: 2019-12-27 17:49:05.32--ServerSession(1197389053)--Thread(Thread[main,5,main])--/file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu login successful
[EL Finest]: query: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Thread(Thread[main,5,main])--Execute query DataModifyQuery(sql="CREATE TABLE ACCOUNT (ID BIGINT NOT NULL, PASSWD VARCHAR(255), USR VARCHAR(255), PRIMARY KEY (ID))")
[EL Finest]: connection: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Connection(6267871)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.385--ServerSession(1197389053)--Thread(Thread[main,5,main])--reconnecting to external connection pool
[EL Fine]: sql: 2019-12-27 17:49:05.402--ServerSession(1197389053)--Connection(991572261)--Thread(Thread[main,5,main])--CREATE TABLE ACCOUNT (ID BIGINT NOT NULL, PASSWD VARCHAR(255), USR VARCHAR(255), PRIMARY KEY (ID))
[EL Finest]: connection: 2019-12-27 17:49:05.891--ServerSession(1197389053)--Connection(6267871)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Finest]: ddl: 2019-12-27 17:49:05.891--Thread(Thread[main,5,main])--The table (ACCOUNT) is created.
[EL Finest]: query: 2019-12-27 17:49:05.91--ServerSession(1197389053)--Thread(Thread[main,5,main])--Execute query DataReadQuery(sql="SELECT * FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'")
[EL Finest]: connection: 2019-12-27 17:49:05.911--ServerSession(1197389053)--Connection(966446307)--Thread(Thread[main,5,main])--Connection acquired from connection pool [read].
[EL Finest]: connection: 2019-12-27 17:49:05.911--ServerSession(1197389053)--Thread(Thread[main,5,main])--reconnecting to external connection pool
[EL Fine]: sql: 2019-12-27 17:49:05.925--ServerSession(1197389053)--Connection(34004511)--Thread(Thread[main,5,main])--SELECT * FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'
[EL Finest]: connection: 2019-12-27 17:49:05.928--ServerSession(1197389053)--Connection(966446307)--Thread(Thread[main,5,main])--Connection released to connection pool [read].
[EL Finer]: metamodel: 2019-12-27 17:49:05.929--ServerSession(1197389053)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.Account_] not found during initialization.
[EL Finer]: metamodel: 2019-12-27 17:49:05.93--ServerSession(1197389053)--Thread(Thread[main,5,main])--Canonical Metamodel class [com.xxxx.api.model.BaseModel_] not found during initialization.
[EL Finest]: jpa: 2019-12-27 17:49:05.93--ServerSession(1197389053)--Thread(Thread[main,5,main])--End deploying Persistence Unit xxxx-pu; session /file:/home/user/NetBeansProjects/xxxx-api/target/classes/_xxxx-pu; state Deployed; factoryCount 1
我已经在 2.1.0.RELEASE
和最新的 2.2.2.RELEASE
上尝试过,效果很好。
关于java - 2.0.9 和 2.1.0 之间的 Spring Boot eclipselink ddl 自动生成问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59492962/
有人可以解释一下 spring-boot-parent 和 spring-boot-starter-parent 之间的区别吗,正如我在下面附加的 GIT HUB 代码链接之一中看到的,他们为 spr
我有与 jersey 框架集成的 Spring Boot 应用程序。 现在,当我尝试运行该应用程序时,它只是停留在 Spring 启动徽标上,之后没有任何 react 。 我也尝试添加 -X ,但徽标
我指的是 Spring Boot 关于 的文档自动配置 和 执行器 模块: 自动配置: Spring Boot AutoConfiguration attempts to automatically
我正在尝试将 apache log4j 集成到我的 Spring boot 应用程序中。这是我的 build.gradle 文件: build.gradle buildscript { rep
使用 Spring Boot Maven 插件的以下命令在生产中启动 Spring Boot 应用程序是否是一个好主意或实践? mvn spring-boot:run 最佳答案 不,这是个坏主意。 您
据我所知,spring boot 和 spring session 为我们提供了一站式自动配置,但是当我的应用程序使用 session redis 和应用程序缓存 redis 时,不是同一个 redi
我希望使用Spring Boot创建一个新的Web应用程序。不幸的是,我的服务器在技术堆栈方面相当有限。它安装了Java 5。 谁能告诉我spring boot是否可以在Java 1.5上运行以及什么
我有3个实体 CarWash(设置Wash) Wash(car_wash_id FK到CarWash) WashComment(wash_id FK到Wash) 有什么办法可以写这个查询 @Qu
我一直在关注this文章。 我正在尝试在Spring-boot应用程序中优雅地处理gRPC错误,的主要目标是能够在gRPC客户端中获取错误状态。 在上面的文章之后,我坚持为异常添加拦截器。如何在Spr
我有一个要使用的自定义log4j布局插件。在IntelliJ中运行或与./gradlew bootRun一起运行时,插件可以正常工作。不使用./gradlew bootJar构建启动jar。 启用-D
我想在给定范围 (5001-5100) 的随机端口上启动 Spring Cloud 应用程序(Spring Boot 1.5.14,Spring Cloud Edgware.SR4)。我知道我们可以使
任何人都可以向我展示或指出不使用 spring boot gradle 插件的 spring boot gradle 项目。 我正在寻找类似不使用 gradle 插件的 spring boot sta
我当时尝试包含上述依赖项之一,但找不到任何区别: spring boot starter web:我可以看到 Flux 和 Mono 类并制作一个响应式(Reactive)休息 Controller
我们一直在为我们的应用程序使用 Springboot 1.X。 现在准备开始一些新的应用程序,想知道我们是应该使用 SpringBoot2.0 还是坚持使用 SpringBoot 1.X? 对一种方式
我希望记录应用程序正在加载 application-profile.propeties 或 application.yml。怎么做。在哪种方法中,我可以听取它并检测它是成功加载还是失败。 最佳答案 您
当我在 pom.xml 中添加简单的 spring-boot-starter-data-jpa 依赖项时,在 pom.xml 文件中出现错误。如果我删除该依赖项,则不会再有错误。我不确定为什么会发生这
我希望记录应用程序正在加载 application-profile.propeties 或 application.yml。怎么做。在哪种方法中,我可以听取它并检测它是成功加载还是失败。 最佳答案 您
我在网上看了很多关于 spring-boot-devtools 的文章和问题,但仍然无法弄清楚为什么它对我不起作用。每次运行我的应用程序时,我都会得到以下信息: 17:54:28.057 [main]
我正在尝试将现有的 Spring 应用程序移植到 Spring Boot。我不使用 spring-boot-starter-data-solr 启动器,但是我的类路径上有 apache solrj (
(这主要是一个历史问题。Pivotal 建议所有论坛讨论都在 StackOverflow 上进行,这就是我在这里问它的原因。) Spring Boot 项目用来证明将应用程序的类和依赖项从可执行 ja
我是一名优秀的程序员,十分优秀!