我有一个带有MySQL数据库的spring MVC启动应用程序,我正在尝试在我的数据库中获取一个TEXT字段.我有以下代码:
Member.java
@Entity
public class Member {
private Long id;
private String name;
@Column(columnDefinition = "TEXT")
private String biography;
private String country;
private String state;
private String city;
private Date dateOfBirth;
private String gender;
//Getters and setters
Run Code Online (Sandbox Code Playgroud)
application.properties
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.datasource.url=jdbc:mysql://localhost:3306/wave
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=mysql
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.h2.console.enabled=true
Run Code Online (Sandbox Code Playgroud)
这是它创建的Hibernate
Hibernate: drop table if exists member
Hibernate: create table member (id bigint not null auto_increment, biography varchar(255), city varchar(255), country varchar(255), date_of_birth date, gender varchar(255), name varchar(255), state varchar(255), primary key (id)) …Run Code Online (Sandbox Code Playgroud) 我现在已经在 Eclipse 中编程了一段时间,但是我有一份新工作并且一切都使用 IntelliJ,所以对于我自己的项目,我现在也想启动 IntelliJ 以习惯快捷方式以及其他什么。当我从 Eclipse 启动它时,我拥有的 Spring Boot 应用程序在 Eclipse 中运行良好。我试图从 pom.xml 在 IntelliJ 中启动一个新项目。我不知道问题是什么。有人可以帮我吗?以下是我在 Spring Boot 中尝试启动 main 时收到的消息:
2017-06-10 17:35:23.288 INFO 6320 --- [ main] c.r.wave.RunescapesiteApplication : Starting RunescapesiteApplication on MSI with PID 6320 (D:\website\runescapesite\target\classes started by Martijn Jansen in D:\website\runescapesite)
2017-06-10 17:35:23.290 INFO 6320 --- [ main] c.r.wave.RunescapesiteApplication : No active profile set, falling back to default profiles: default
2017-06-10 17:35:23.343 INFO 6320 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@80ec1f8: startup date [Sat Jun 10 …Run Code Online (Sandbox Code Playgroud) 一段时间以来,我开始使用 IntelliJ 而不是 Eclipse。我从 IntelliJ 中的 Eclipse(它正在运行的地方)创建了我的项目,我可以启动 Spring Boot 应用程序。作为前端,我使用 JSP 文件,但是当我在浏览器中打开该项目时,它仅显示 HTML 代码,而不是实际的网站。谁能帮我解决这个问题吗?