Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Configuration
- @EnableGlobalMethodSecurity(securedEnabled = true)
- public class AppConfig extends WebMvcConfigurerAdapter {
- private String DRIVER = "com.mysql.jdbc.Driver";
- private String URL = "jdbc:mysql://localhost/system?autoReconnect=true&useSSL=false";
- private String USERNAME = "root";
- private String PASSWORD = "root";
- @Bean
- @Primary
- public DataSource dataSource() {
- return DataSourceBuilder
- .create()
- .username(USERNAME)
- .password(PASSWORD)
- .url(URL)
- .driverClassName(DRIVER)
- .build();
- }
- spring.jpa.hibernate.ddl-auto=create
- spring.jpa.show-sql=true
- spring.jpa.properties.hibernate.format_sql=true
- logging.level.org.hibernate.type=TRACE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement