我正在尝试用Spring做一个简单的应用程序。我安装了用于Eclipse的插件spring(Spring Tool Suite(STS))。我在文件pom.xml中添加了Maven依赖项,但没有加载jar文件。我无法在类Produit中导入@Entity @Id,并且我不知道我的问题在哪里。
即时通讯收到此错误:
实体无法解析为类型。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sid</groupId>
<artifactId>ebotique</artifactId>
<name>EBotiqueV3</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- AspectJ -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> …Run Code Online (Sandbox Code Playgroud) 当我包含一个没有不同密度版本的图标时,我收到一个 lint 警告。也就是说,如果我myIcon.png向 drawable-mdpi 目录添加一个图标 , ,lint 会抱怨我myIcon.png在其他可绘制目录(drawable-hdpi、-xhdpi、-xxhdpi)中没有 的版本。
我想取消此警告,无论是针对所有图标,还是专门针对myIcon.png.
lint-config.xml为了实现这些抑制,我需要添加什么语法?
例子lint-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="MissingTranslation" severity="ignore" />
</lint>
Run Code Online (Sandbox Code Playgroud)
lint-config.xmlin 的用法build.gradle(在我的 Android 手机中):
android {
lintOptions {
lintConfig file("lint-config.xml")
}
}
Run Code Online (Sandbox Code Playgroud) 如何在可视化编辑器eclipse中显示表列的名称?
我无法显示列的标题.
table = new JTable();
table.setBorder(new EtchedBorder(EtchedBorder.LOWERED,
UIManager.getColor("nimbusInfoBlue"),
UIManager.getColor("nimbusFocus")));
table.setRowHeight(20);
table.setShowVerticalLines(true);
table.setModel(new DefaultTableModel(
new Object[][]{
{null, null, null, null, null, "", null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},
{null, null, null, null, null, null, null},},
//Les titres des colonnes
new String[]{
"reference", "CIN/RC", …Run Code Online (Sandbox Code Playgroud) 我想搜索列的最大值,但找到的值始终为0
public int maXnumR()
{
DataBase s = DataBase.getInstance();
int numR= getnumR();
String req1 = "SELECT max(`idrf`) FROM `reference` WHERE `numR` = "
+ numR + " GROUP BY `numR` ";
try
{
Statement m= s.getConn().createStatement();
ResultSet r1 = m.executeQuery(req1);
while (r1.next())
{
maxnumR =r1.getInt("idrf");
nbp++;
}
}
catch (SQLException e1)
{
e1.printStackTrace();
System.out.println("maXnumR : "+e1);
}
return maxnumR;
}
Run Code Online (Sandbox Code Playgroud)
maXnumR返回0并且表不为空.
如果我执行查询它可以正常使用MySQL
ERREUR:
java.sql.SQLException: Column 'idrf' not found.
maXnumR : java.sql.SQLException: Column 'idrf' not found.
idrf existe:0
Run Code Online (Sandbox Code Playgroud) 我正在尝试用Spring做一个简单的应用程序。我安装了用于Eclipse的插件spring(Spring Tool Suite(STS))。我在文件pom.xml.im中添加了Maven依赖关系,试图添加相同的Spring依赖关系。我有以下问题:Spring-tx,Spring-orm,Spring-beans和Spring-core
我的问题是:spring-tx,spring-orm,spring-beans,spring-core在添加这些依赖项时出现问题。
我试图使用视图Dependencies Add-> Select Dependency添加主题,但是我找不到Spring-tx和Spring-orm
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sid</groupId>
<artifactId>ebotique</artifactId>
<name>EBotiqueV3</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.2.2.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- AspectJ -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency> …Run Code Online (Sandbox Code Playgroud) java ×3
maven ×2
spring ×2
android ×1
eclipse ×1
hibernate ×1
jscrollpane ×1
jtable ×1
lint ×1
mysql ×1
spring-mvc ×1
sqlexception ×1
swing ×1